Skip to content

Publish release to NPM #2

Publish release to NPM

Publish release to NPM #2

Workflow file for this run

name: Publish Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version number
id: get_version
run: |
echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- uses: actions/create-release@master
name: Create ${{ github.event.inputs.version }} Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ steps.get_version.outputs.version }}"
release_name: "${{ steps.get_version.outputs.version }}"
- name: Publish to NPM
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939
with:
token: ${{ secrets.NPM_TOKEN }}