Skip to content

Commit 979697a

Browse files
committed
ci: add workflow publish --dry-run
1 parent 5c261c6 commit 979697a

2 files changed

Lines changed: 45 additions & 2 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: publish --dry-run
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish_crates_io:
8+
name: publish (crates.io) --dry-run
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: dtolnay/rust-toolchain@stable
14+
- name: apt-get install
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get install -y libwebkit2gtk-4.1-dev
18+
- name: cargo publish
19+
run: cargo publish --dry-run
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
22+
23+
publish_npmjs_com:
24+
name: publish (npmjs.com) --dry-run
25+
runs-on: ubuntu-latest
26+
permissions:
27+
id-token: write # use of OIDC for npm provenance
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: pnpm/action-setup@v4
32+
with:
33+
version: 9
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: "lts/*"
37+
cache: "pnpm"
38+
- run: pnpm install
39+
- name: pnpm publish
40+
run: pnpm publish --access public --no-git-checks --dry-run
41+
env:
42+
NPM_CONFIG_PROVENANCE: true
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
sudo apt-get update
1717
sudo apt-get install -y libwebkit2gtk-4.1-dev
1818
- name: cargo publish
19-
run: cargo publish --dry-run
19+
run: cargo publish
2020
env:
2121
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2222

@@ -37,7 +37,7 @@ jobs:
3737
cache: "pnpm"
3838
- run: pnpm install
3939
- name: pnpm publish
40-
run: pnpm publish --access public --no-git-checks --dry-run
40+
run: pnpm publish --access public --no-git-checks
4141
env:
4242
NPM_CONFIG_PROVENANCE: true
4343
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)