v0.8.0 #19
Workflow file for this run
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: Publish NPM Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install node modules | |
run: npm install | |
- name: Compile contracts | |
run: npx hardhat compile | |
- name: Run contract tests | |
id: run-tests | |
run: npx hardhat test | |
publish: | |
name: Publish Contracts | |
environment: global | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: npm ci | |
- name: Compile and publish | |
run: npm run publish-packages | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |