v0.16.8 #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on npm and crates | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish_npm_dry_run: | |
name: NPM publish (dry run) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install NodeJS Dependencies | |
uses: ./.github/actions/install-node-dependencies | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: Build | |
run: pnpm build | |
- name: Publish | |
run: pnpm publish -r --no-git-checks --dry-run | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
publish_crates_dry_run: | |
name: Crates publish (dry run) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: 'stable' | |
- uses: katyo/publish-crates@v2 | |
with: | |
path: './crates/tuono' | |
dry-run: true | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
check-repo: true | |
publish_npm: | |
name: NPM publish | |
needs: [publish_npm_dry_run, publish_crates_dry_run] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install NodeJS Dependencies | |
uses: ./.github/actions/install-node-dependencies | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
- name: Clone root README.md on tuono package | |
run: cp README.md packages/tuono/README.md | |
- name: Build | |
run: pnpm build | |
- name: Publish | |
run: pnpm publish -r --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
publish_crates: | |
name: Crates publish | |
needs: [publish_npm_dry_run, publish_crates_dry_run] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: 'stable' | |
- uses: katyo/publish-crates@v2 | |
with: | |
path: './crates/tuono' | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
check-repo: true |