Publish #2
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 | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ${{ vars.LINUX }} | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ vars.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Version | |
run: | | |
npm --no-git-tag-version --allow-same-version version `git describe --abbrev=0 --tags` | |
- name: Build | |
run: npm i && npm run build | |
- name: Publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Notify on failure | |
if: ${{ failure() }} | |
uses: ./.github/actions/fail-notification | |
with: | |
webhook-url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }} |