Skip to content

Investigating release actions, part 2 #5

Investigating release actions, part 2

Investigating release actions, part 2 #5

Workflow file for this run

name: Deploy to NPM
on:
release:
types: [published]
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}