Merge pull request #280 from proto-kit/feature/event-hooks #23
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: Release NPM Packages | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: 'Current git sha for the website to pull from' | |
| required: true | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: develop | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22.9.0 | |
| cache: npm | |
| - name: "Install dependencies" | |
| run: npm ci --workspaces --include-workspace-root | |
| - name: "Build" | |
| run: npm run build | |
| - name: "NPM Identity" | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
| - name: Run Lerna Release | |
| run: npm run publish:canary | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Trigger website build & deployment | |
| env: | |
| NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} | |
| run: | | |
| curl -X POST -d {} $NETLIFY_BUILD_HOOK |