v1.50.1 #199
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: NPM publish | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup variables | |
id: variables | |
shell: bash | |
env: | |
TAG_NAME: ${{ github.event.release.tag_name }} | |
run: | | |
if [[ "${TAG_NAME}" =~ beta ]]; then | |
echo "::set-output name=NPM_TAG::--tag beta" | |
fi | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
registry-url: https://registry.npmjs.org/ | |
- name: Publish to npm | |
run: | | |
npm ci | |
npm publish --access public ${TAG_NAME} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
TAG_NAME: ${{ steps.variables.outputs.NPM_TAG }} |