Deploy To NPM #105
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: | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
APP_ID: ${{ secrets.APP_ID }} | |
APP_TOKEN: ${{ secrets.APP_TOKEN }} | |
EXAMPLE_USER_ID: ${{ secrets.EXAMPLE_USER_ID }} | |
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }} | |
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: 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: Build | |
run: npm run set-version && npm run build | |
- 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 publish -- --token "$NPM_ACCESS_TOKEN" | |
env: | |
NPM_ACCESS_TOKEN: ${{ env.NPM_ACCESS_TOKEN }} |