Skip to content

fix: release.yml

fix: release.yml #11

Workflow file for this run

name: Publish Package
on:
push:
tags:
- v*
jobs:
publish-npm:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js v20
uses: actions/setup-node@v3
with:
node-version: 20
always-auth: true
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install Dependencies
run: npm install
- name: Generate Changelog
run: npx changelogithub --no-group
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}