v0.3.1 #6
Workflow file for this run
This file contains hidden or 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 to npm | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: Release tag to publish (e.g. v0.3.1) | |
| required: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| name: Publish | |
| if: github.repository == 'resolute/std' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.tag || github.ref_name }} | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: latest | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| registry-url: https://registry.npmjs.org | |
| package-manager-cache: false | |
| - name: Verify release tag matches deno.json | |
| shell: bash | |
| env: | |
| RELEASE_TAG: ${{ inputs.tag || github.ref_name }} | |
| run: | | |
| VERSION="$(node -p "require('./deno.json').version")" | |
| test "${RELEASE_TAG}" = "v${VERSION}" | |
| - name: Pack release tarball | |
| run: deno task pack:release | |
| - name: Publish npm package | |
| run: npm publish ./*.tgz --access public --provenance |