Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 966c443

Browse files
🚀 Add publish workflow to Node.js Patch
1 parent 185d7f0 commit 966c443

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

‎.github/workflows/pnpm-version-patch.yaml‎

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ jobs:
66
patch:
77
runs-on: ubuntu-latest
88

9+
if: github.actor != 'nektos/act' && github.ref_name == 'main'
10+
911
permissions:
1012
contents: write
1113

12-
if: github.actor != 'nektos/act' && github.ref_name == 'main'
14+
outputs:
15+
version: ${{ steps.patch.outputs.VERSION }}
1316

1417
steps:
1518
- uses: actions/checkout@v4
@@ -43,3 +46,51 @@ jobs:
4346
COMMIT: ${{ steps.commit.outputs.commit }}
4447
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4548
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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /