|
6 | 6 | patch:
|
7 | 7 | runs-on: ubuntu-latest
|
8 | 8 |
|
| 9 | + if: github.actor != 'nektos/act' && github.ref_name == 'main' |
| 10 | + |
9 | 11 | permissions:
|
10 | 12 | contents: write
|
11 | 13 |
|
12 |
| - if: github.actor != 'nektos/act' && github.ref_name == 'main' |
| 14 | + outputs: |
| 15 | + version: ${{ steps.patch.outputs.VERSION }} |
13 | 16 |
|
14 | 17 | steps:
|
15 | 18 | - uses: actions/checkout@v4
|
|
43 | 46 | COMMIT: ${{ steps.commit.outputs.commit }}
|
44 | 47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
45 | 48 | VERSION: ${{ steps.patch.outputs.VERSION }}
|
| 49 | + |
| 50 | + publish: |
| 51 | + runs-on: ubuntu-latest |
| 52 | + |
| 53 | + needs: patch |
| 54 | + |
| 55 | + permissions: |
| 56 | + contents: write # Upload the release files |
| 57 | + id-token: write # Add `--provenance` |
| 58 | + packages: write # Publish the package |
| 59 | + |
| 60 | + if: github.actor != 'nektos/act' |
| 61 | + |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + ref: ${{ needs.patch.outputs.version }} |
| 66 | + - uses: pnpm/action-setup@v4 |
| 67 | + with: |
| 68 | + version: latest |
| 69 | + - uses: actions/setup-node@v4 |
| 70 | + with: |
| 71 | + cache: pnpm |
| 72 | + node-version: latest |
| 73 | + - run: pnpm install |
| 74 | + - run: pnpm build |
| 75 | + |
| 76 | + - uses: actions/setup-node@v4 |
| 77 | + with: |
| 78 | + registry-url: https://npm.pkg.github.com |
| 79 | + scope: "@coderabbitai" |
| 80 | + - run: pnpm publish --access public --no-git-checks --provenance |
| 81 | + env: |
| 82 | + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 83 | + |
| 84 | + - uses: actions/setup-node@v4 |
| 85 | + with: |
| 86 | + registry-url: https://registry.npmjs.org |
| 87 | + scope: "@coderabbitai" |
| 88 | + - run: pnpm publish --access public --no-git-checks --provenance |
| 89 | + env: |
| 90 | + NODE_AUTH_TOKEN: ${{ secrets.CODERABBIT_NPM_TOKEN }} |
| 91 | + |
| 92 | + - run: pnpm pack --pack-gzip-level 9 |
| 93 | + - run: gh release upload "$VERSION" coderabbitai-bitbucket-*.tgz |
| 94 | + env: |
| 95 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 96 | + VERSION: ${{ needs.patch.outputs.version }} |
0 commit comments