Skip to content

Commit 0277c6f

Browse files
committed
Refactor GitHub Actions workflow for package versioning and publishing
- Split the workflow into two jobs: 'version-packages' and 'publish-packages'. - Updated Node.js version for the publish job to 24.x. - Removed unnecessary environment variables and steps related to npm authentication. - Adjusted the 'Create Release Pull Request' step to not publish automatically.
1 parent fbc37af commit 0277c6f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,41 @@ on:
77
- "pre-release-beta/**"
88
- "beta/**"
99
- "prototype-beta/**"
10-
env:
11-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1210

1311
permissions:
1412
id-token: write # Required for OIDC
1513
contents: read
1614

1715
jobs:
18-
publish-npm:
19-
name: Release
16+
version-packages:
17+
name: Version Packages
2018
runs-on: ubuntu-latest
2119
steps:
2220
- uses: actions/checkout@v6
2321
- uses: actions/setup-node@v5
2422
with:
2523
node-version: "18.x"
26-
registry-url: https://registry.npmjs.org/
2724
- name: Install dependencies
2825
run: yarn
29-
- name: Create .npmrc file
30-
run: |
31-
cat << EOF > "$HOME/.npmrc"
32-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
33-
always-auth = true
34-
EOF
35-
env:
36-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37-
- name: Create Release Pull Request or Publish to npm
26+
- name: Create Release Pull Request
3827
uses: changesets/action@v1
3928
with:
40-
publish: yarn release
29+
publish: false
4130
version: yarn version-packages
4231
env:
4332
GITHUB_TOKEN: ${{ secrets.MEILI_BOT_GH_PAT }}
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
34+
publish-packages:
35+
name: Publish Packages
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v6
39+
- uses: actions/setup-node@v5
40+
with:
41+
node-version: "24.x"
42+
- name: Install dependencies
43+
run: yarn
44+
- name: Build packages
45+
run: yarn build
46+
- name: Publish to npm
47+
run: yarn release

0 commit comments

Comments
 (0)