Skip to content

Add GitHub Actions workflow for automated publishing and release crea… #1

Add GitHub Actions workflow for automated publishing and release crea…

Add GitHub Actions workflow for automated publishing and release crea… #1

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
run: |
gh release create ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
--notes "Release ${{ github.ref_name }}" \
--repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}