v1.2.159 #8
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
on: | |
release: | |
types: [created] | |
name: release | |
jobs: | |
build: | |
name: create release | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: build project | |
run: | | |
npm ci | |
npm run build | |
npm test | |
env: | |
CI: true | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
NPM_TFSO_TOKEN: ${{secrets.NPM_TFSO_TOKEN}} | |
- name: upload artifact | |
uses: actions/[email protected] | |
with: | |
name: artifact | |
path: | | |
lib/ | |
src/ | |
package.json | |
README.md | |
LICENSE | |
publish-github: | |
name: publish npm to github | |
if: "!github.event.release.prerelease" # https://developer.github.com/v3/activity/events/types/#releaseevent | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: download artifact | |
uses: actions/[email protected] | |
with: | |
name: artifact | |
- name: setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
registry-url: https://npm.pkg.github.com/ | |
- name: publish | |
run: | | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |