Publish packages to npm #64
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 packages to npm | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
required: true | |
type: choice | |
description: tag to publish | |
default: latest | |
options: | |
- latest | |
- beta | |
- alpha | |
package: | |
required: true | |
type: choice | |
description: package to publish | |
default: hardhat-zksync-deploy | |
options: | |
- hardhat-zksync-deploy | |
- hardhat-zksync-solc | |
- hardhat-zksync-upgradable | |
- hardhat-zksync-vyper | |
- hardhat-zksync-verify | |
- hardhat-zksync | |
- hardhat-zksync-node | |
- hardhat-zksync-chai-matchers | |
- hardhat-zksync-ethers | |
- hardhat-zksync-verify-vyper | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
cache: pnpm | |
- name: Setup environment | |
run: pnpm install && pnpm build | |
- name: Publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }} | |
run: | | |
pnpm publish packages/${{inputs.package}} --tag ${{ inputs.tag }} --access=public |