Skip to content

3.0.5: fix release workflow #6

3.0.5: fix release workflow

3.0.5: fix release workflow #6

Workflow file for this run

name: GitHub Release & NPM Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
github-release:
name: Create GitHub Release 🚀
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--generate-notes
npm-publish:
name: Publish to NPM 📦
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Sets up .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
# Setup pnpm
- uses: pnpm/action-setup@v4
with:
version: 9.11.0
# Need no git checks or this fails with ERR_PNPM_GIT_UNKNOWN_BRANCH
# because we checked out a tag wihch is a detached head
- run: pnpm publish --provenance --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}