publish #16
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 | |
on: | |
workflow_run: | |
workflows: ["ci"] | |
branches: [master] # Ensure it only triggers for pushes to master | |
types: | |
- completed # Runs only if Workflow A completes successfully | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Single deploy job since we're just deploying | |
npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use PNPM | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org/' | |
always-auth: true | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- run: pnpm install | |
- run: pnpm build | |
- run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |