Skip to content

ci(github): fix release workflow to publish npm package #31

ci(github): fix release workflow to publish npm package

ci(github): fix release workflow to publish npm package #31

Workflow file for this run

name: Release
on:
push:
branches:
- master
- next
- beta
workflow_dispatch:
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: ubuntu-22.04
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
env:
HUSKY: 0 # Disable husky (git hooks) in CI, see: https://typicode.github.io/husky/#/?id=disable-husky-in-cidocker
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install Dependencies
run: npm clean-install
- name: Run Tests
run: npm test
- name: Build Package
run: npm run build
- name: Release package to npm and GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release:ci