4.1.0-beta6 #35
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 Release Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
if: '!github.event.release.prerelease' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm run build | |
- name: Run test coverage | |
run: npm run coverage | |
- name: Zip coverage results | |
run: zip -r coverage.zip "coverage/" "coverage.json" | |
- name: Upload artifacts to release | |
uses: softprops/action-gh-release@v1 | |
if: ${{startsWith(github.ref, 'refs/tags/') }} | |
with: | |
files: coverage.zip | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
publish-gpr: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@tokenysolutions' | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |