Deployment #31
This file contains hidden or 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: Deployment | |
| on: | |
| workflow_run: | |
| workflows: [Continuous Integration] | |
| types: [completed] | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| name: Publish all NPM Packages | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| always-auth: true | |
| registry-url: https://registry.npmjs.org | |
| scope: '@spearwolf' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: true | |
| env: | |
| NPM_TOKEN: xxx | |
| - run: pnpm run publishNpmPkg | |
| name: Publish packages | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |