Skip to content

Commit

Permalink
ci: add workflow publish --dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-mader committed Feb 20, 2025
1 parent 5c261c6 commit 979697a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-dry-run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: publish --dry-run

on:
workflow_dispatch:

jobs:
publish_crates_io:
name: publish (crates.io) --dry-run
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev
- name: cargo publish
run: cargo publish --dry-run
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

publish_npmjs_com:
name: publish (npmjs.com) --dry-run
runs-on: ubuntu-latest
permissions:
id-token: write # use of OIDC for npm provenance

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"
- run: pnpm install
- name: pnpm publish
run: pnpm publish --access public --no-git-checks --dry-run
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev
- name: cargo publish
run: cargo publish --dry-run
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Expand All @@ -37,7 +37,7 @@ jobs:
cache: "pnpm"
- run: pnpm install
- name: pnpm publish
run: pnpm publish --access public --no-git-checks --dry-run
run: pnpm publish --access public --no-git-checks
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 979697a

Please sign in to comment.