Merge pull request #23 from Melissa-Forbs/dependabot/npm_and_yarn/npm… #23
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: Build&Publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'solana-labs' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- run: yarn | |
- run: yarn test | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'solana-labs' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@solana' | |
- run: yarn | |
- run: git config --global user.email "[email protected]" && git config --global user.name "$GITHUB_ACTOR" | |
- run: yarn run version --patch | |
- run: git push --follow-tags origin main | |
- run: yarn run purge:cdn | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |