Skip to content

Commit 42f90ad

Browse files
committed
Update workflow
1 parent 0a7ae2d commit 42f90ad

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ on:
1111
- "v*"
1212

1313
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: dtolnay/rust-toolchain@stable
19+
- run: cargo test
20+
1421
publish:
22+
if: github.ref_type == 'tag'
23+
needs: test
1524
runs-on: ubuntu-latest
1625
permissions:
1726
id-token: write # Required for OIDC token exchange
1827
steps:
1928
- uses: actions/checkout@v6
2029
- uses: dtolnay/rust-toolchain@stable
21-
- name: Test
22-
run: |
23-
cargo test
24-
git checkout .
25-
- name: Dry run
26-
if: github.ref_type != 'tag'
27-
run: cargo publish --dry-run
2830
- uses: rust-lang/crates-io-auth-action@v1
29-
if: github.ref_type == 'tag'
3031
id: auth
3132
- name: Publish crate
32-
if: github.ref_type == 'tag'
3333
run: cargo publish
3434
env:
3535
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)