Skip to content

Commit

Permalink
maint: refine the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-XIAO committed Sep 2, 2024
1 parent 9759b13 commit feb6867
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,24 @@ jobs:
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile

- name: Publish to npm (dry-run)
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: pnpm publish --dry-run

- name: Publish to crates.io (dry-run)
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run

- name: Publish to npm
if: github.event_name == 'push'
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
pnpm publish --dry-run
else
pnpm publish
fi
run: pnpm publish

- name: Publish to crates.io
if: github.event_name == 'push'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
cargo publish --dry-run
else
cargo publish
fi
run: cargo publish

0 comments on commit feb6867

Please sign in to comment.