Skip to content

Commit 4365bd4

Browse files
authored
Merge pull request #94 from Kobzol/secure-ci
Run pre-release test in a different job than publish
2 parents 5a18358 + 3d6d6e0 commit 4365bd4

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ on:
66
- main
77

88
jobs:
9-
# Release unpublished packages.
10-
release:
11-
name: Release-plz release
9+
test:
10+
name: Release test
1211
runs-on: ubuntu-latest
1312
if: ${{ github.repository_owner == 'kobzol' }}
14-
permissions:
15-
contents: write
16-
id-token: write
1713
steps:
1814
- &checkout
1915
name: Checkout repository
@@ -30,6 +26,19 @@ jobs:
3026
command: install
3127
args: --locked --version 1.0.118 cargo-expand
3228
- run: cargo test
29+
# Release unpublished packages.
30+
release:
31+
name: Release-plz release
32+
runs-on: ubuntu-latest
33+
if: ${{ github.repository_owner == 'kobzol' }}
34+
needs:
35+
- test
36+
permissions:
37+
contents: write
38+
id-token: write
39+
steps:
40+
- *checkout
41+
- *install-rust
3342
- uses: rust-lang/crates-io-auth-action@v1
3443
id: auth
3544
- name: Run release-plz

0 commit comments

Comments
 (0)