Skip to content

Publish package

Publish package #1

Workflow file for this run

name: Publish package
on:
release:
types: [published]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
- name: Publish package
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
npm version "$VERSION"
npm publish