-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tu6ge
committed
Sep 14, 2024
1 parent
9569a9f
commit b6356fb
Showing
1 changed file
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Test and Publish | |
|
||
on: | ||
push: | ||
branches: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
|
@@ -12,7 +12,7 @@ jobs: | |
test: | ||
runs-on: ubuntu-latest | ||
|
||
name: 'test' | ||
name: "test" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -24,7 +24,7 @@ jobs: | |
with: | ||
command: clippy | ||
args: --all-features -- -D warnings | ||
|
||
- name: Show cargo info | ||
run: cargo version --verbose | ||
|
||
|
@@ -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 | ||
|
@@ -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 | ||
|