Publish package #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |