Reduce file entries #5059
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: release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: release-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
cargo: | |
runs-on: ubuntu-latest | |
environment: ${{ github.ref == 'refs/heads/main' && 'release' || 'test' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: tools/ci/release.sh ${{ github.ref == 'refs/heads/main' && '--' || '--dry-run' }} | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
wasm: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
environment: ${{ github.ref == 'refs/heads/main' && 'release' || 'test' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: cargo install wasm-pack | |
- run: wasm-pack build --target web wasm | |
- run: | | |
jq '. + input' pkg/package.json package.json > /tmp/package.json | |
mv /tmp/package.json pkg | |
working-directory: wasm | |
- run: wasm-pack pack wasm | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
access: public | |
package: wasm/pkg | |
provenance: true | |
token: ${{ secrets.NPM_TOKEN }} | |
if: github.ref == 'refs/heads/main' | |
release: | |
needs: | |
- cargo | |
- wasm | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: for result in ${{ join(needs.*.result, ' ') }}; do [ $result = success ]; done |