Changes from tag: 0.1.6 #15
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: NPM Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: yarn install | |
- name: Build snap | |
run: yarn build:local | |
- name: Run tests | |
run: yarn test | |
publish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
scope: '@bitpandacustody' | |
registry-url: 'https://registry.npmjs.org' | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Build the package | |
run: yarn build:production | |
- name: Publish to npm | |
working-directory: packages/snap | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |