trigger-release #34
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
# This workflow build and publish NPM artifacts | |
name: Publish NPM artifacts | |
on: | |
repository_dispatch: | |
types: [trigger-release] | |
jobs: | |
publish-npm-artifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js '16.15.0' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16.15.0" | |
registry-url: "https://registry.npmjs.org" | |
scope: "@lukso" | |
cache: "npm" | |
- name: Install | |
run: | | |
npm ci | |
# This will also generate the Typechain types used by the Chai tests | |
- name: Build and Test | |
run: | | |
npx hardhat compile | |
npm run test | |
- name: Publish | |
run: | | |
npm run build:js | |
npm run package | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }} |