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 in GitHub Package Registry | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm test | |
publish-gpr: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Set Node.js Version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm install | |
- name: Build package files | |
run: npm run build | |
- name: Configure GitHub Package Registry as Publish Target | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@supercharge' | |
- name: Publish to GitHub Package Registry | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_PUBLISH_GPR_TOKEN }} |