Merge pull request #26 from passageidentity/PSG-4175 #3
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: Deploy To NPM | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
env: | |
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
PAT: ${{ secrets.BEACHBALL_PAT }} | |
jobs: | |
publish: | |
name: Deploy To NPM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ env.PAT }} | |
- name: Setup Node Version using nvmrc | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Unit Test | |
run: npm i && npm run test | |
- name: Beachball Check | |
run: | | |
npm run beachball:check | |
- name: Beachball Bump | |
run: | | |
npm run beachball:bump | |
- name: Prepack | |
run: npm run prepack | |
- name: Clear Beachball Changes | |
run: | | |
git reset --hard | |
- name: Deploy to NPM | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Beachball Machine Account" | |
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git | |
npm run beachball:publish -- --token ${{ env.NPM_ACCESS_TOKEN }} | |