Skip to content

Release

Release #42

Workflow file for this run

name: "Release"
on:
workflow_dispatch:
inputs:
dryrun:
description: 'Add --dry-run flag to npm publish'
default: true
type: boolean
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
prebuild:
uses: ./.github/workflows/prebuild.yml
with:
ref: ${{ github.ref }}
repository: ${{ github.repository }}
release:
runs-on: ubuntu-latest
needs:
- prebuild
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org" # required to use auth
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
path: prebuilds
merge-multiple: true
- run: tree prebuilds
- run: yarn install --ignore-scripts
- run: yarn build
- run: yarn
- run: yarn test
- name: Simulate Publishing to NPM
if: ${{ inputs.dryrun }}
run: npm publish --access public --dry-run
- name: Publish to NPM
if: ${{ !inputs.dryrun }}
run: npm publish --access public