Skip to content

Commit

Permalink
chore: upgrade publish-action
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed Sep 14, 2024
1 parent 9569a9f commit b6356fb
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test and Publish

on:
push:
branches:
branches:
- "*"
pull_request:
branches:
Expand All @@ -12,7 +12,7 @@ jobs:
test:
runs-on: ubuntu-latest

name: 'test'
name: "test"
steps:
- uses: actions/checkout@v3

Expand All @@ -24,7 +24,7 @@ jobs:
with:
command: clippy
args: --all-features -- -D warnings

- name: Show cargo info
run: cargo version --verbose

Expand All @@ -42,34 +42,25 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref_name == 'main'}}
runs-on: ubuntu-latest

name: 'publish'
name: "publish"

environment: cargo

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# v0.1.15 目前版本
- name: Cache
uses: Swatinem/rust-cache@v1
with:
key: ${{ runner.os }}-build-v0.2.2

- name: Install publish-action
if: steps.cache-publish-action.outputs.cache-hit != 'true'
run: |
cargo install publish-action --version=0.2.2
- name: Run publish-action
id: publish-action
run:
publish-action
- name: Run publish-action of oss
uses: tu6ge/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

with:
DIR: "/"
TAG_PREFIX: "v"

# grcov:
# name: Coverage and Grcov
# runs-on: ubuntu-latest
Expand All @@ -96,7 +87,7 @@ jobs:
# CARGO_INCREMENTAL: '0'
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'

# - uses: actions-rs/cargo@v1
# with:
# command: test
Expand Down

0 comments on commit b6356fb

Please sign in to comment.