Skip to content

Commit d40c64f

Browse files
authored
Revert "chore: enable trusted publishing for npm packages" (#4040)
1 parent f045a45 commit d40c64f

File tree

4 files changed

+20
-77
lines changed

4 files changed

+20
-77
lines changed

.github/workflows/preview.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,23 @@ jobs:
2525
name: Release
2626
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
2727
runs-on: ubuntu-latest
28-
environment: npm
2928
steps:
3029
- name: Checkout
31-
uses: actions/checkout@v4
30+
uses: actions/checkout@v3
3231
with:
3332
fetch-depth: 25
3433

34+
- name: Install Pnpm
35+
run: |
36+
corepack prepare [email protected] --activate
37+
corepack enable
38+
3539
- name: Setup Node.js 18
36-
uses: actions/setup-node@v4
40+
uses: actions/setup-node@v3
3741
with:
3842
node-version: '18'
3943
cache: 'pnpm'
4044

41-
# Update npm to the latest version to enable OIDC
42-
# Use corepack to install pnpm
43-
- name: Setup Package Managers
44-
run: |
45-
npm install -g npm@latest
46-
npm --version
47-
npm install -g corepack@latest --force
48-
corepack prepare [email protected] --activate
49-
corepack enable
50-
5145
- name: Install deps
5246
run: pnpm install
5347

@@ -57,17 +51,15 @@ jobs:
5751
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
5852
ls -l packages/*/dist packages/*/package.json
5953
60-
- uses: actions/github-script@v7
61-
id: version_to_release
54+
- name: Release
55+
uses: module-federation/actions@v2
6256
with:
63-
result-encoding: string
64-
script: |
65-
const fs = require('fs');
66-
const packageJson = JSON.parse(fs.readFileSync('./packages/runtime/package.json', 'utf8'));
67-
return 'v' + packageJson.version;
68-
69-
- name: Publish to npm
70-
run: |
71-
git tag ${{ steps.version_to_release.outputs.result }}
72-
git push origin ${{ steps.version_to_release.outputs.result }}
73-
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
57+
version: ${{ github.event.inputs.version || 'next' }}
58+
branch: ${{ github.event.inputs.branch }}
59+
type: 'release'
60+
tools: 'changeset'
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
63+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64+
REPOSITORY: ${{ github.repository }}
65+
REF: ${{ github.ref }}

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
},
3838
"publishConfig": {
3939
"access": "public",
40+
"provenance": true,
4041
"registry": "https://registry.npmjs.org/"
4142
}
4243
}

packages/rsbuild-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
},
7171
"publishConfig": {
7272
"access": "public",
73+
"provenance": true,
7374
"registry": "https://registry.npmjs.org/"
7475
}
7576
}

0 commit comments

Comments
 (0)