Merge pull request #14 from byu-oit/updateGHANode #13
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: Deployment | |
on: | |
push: | |
branches: [master] | |
env: | |
node_version: "20" | |
jobs: | |
publish: | |
name: Publish npm package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Disallow Concurrent Runs | |
uses: byu-oit/github-action-disallow-concurrent-runs@v2 | |
with: | |
token: ${{ github.token }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node_version }} | |
registry-url: https://npm.pkg.github.com | |
scope: '@byu-oit' | |
- name: Install | |
run: npm install | |
- name: Test | |
run: npm run test | |
- name: Publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node_version }} | |
registry-url: https://registry.npmjs.org | |
scope: '@byu-oit' | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |