Skip to content

Commit bef29f4

Browse files
authored
Enable npm OIDC publishing (#6128)
* Enable npm OIDC publishing * 4.52.4-0 * Set up npm exactly like in the example * 4.52.4-1 * Fix packages * Revert some things to check if we can still publish * 4.52.4-2 * Switch back to cached node modules * 4.52.4-3
1 parent 74c555c commit bef29f4

File tree

27 files changed

+121
-48
lines changed

27 files changed

+121
-48
lines changed

.github/workflows/build-and-tests.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
target: i686-pc-windows-msvc
8585
- host: windows-latest
8686
target: aarch64-pc-windows-msvc
87-
- host: windows-latest
87+
- host: windows-latest
8888
target: x86_64-pc-windows-gnu
8989
msystem: ucrt64
9090
toolchain: ucrt-x86_64
@@ -345,23 +345,23 @@ jobs:
345345
- arch: armv7
346346
distro: ubuntu_latest
347347
target: armv7-unknown-linux-gnueabihf
348-
# There is a bug that hangs the build when running npm
349-
# - arch: armv7
350-
# distro: alpine_latest
351-
# target: armv7-unknown-linux-musleabihf
352-
# This one has become very flaky as of late
353-
# - arch: ppc64le
354-
# distro: ubuntu_latest
355-
# target: powerpc64le-unknown-linux-gnu
356-
# use-nvm: true
348+
# There is a bug that hangs the build when running npm
349+
# - arch: armv7
350+
# distro: alpine_latest
351+
# target: armv7-unknown-linux-musleabihf
352+
# This one has become very flaky as of late
353+
# - arch: ppc64le
354+
# distro: ubuntu_latest
355+
# target: powerpc64le-unknown-linux-gnu
356+
# use-nvm: true
357357
- arch: s390x
358358
distro: ubuntu_latest
359359
target: s390x-unknown-linux-gnu
360360
use-nvm: true
361-
# I could not find a way to install Node without compiling from source
362-
# - arch: riscv64
363-
# distro: ubuntu_latest
364-
# target: riscv64gc-unknown-linux-gnu
361+
# I could not find a way to install Node without compiling from source
362+
# - arch: riscv64
363+
# distro: ubuntu_latest
364+
# target: riscv64gc-unknown-linux-gnu
365365
runs-on: ubuntu-latest
366366
timeout-minutes: 120
367367
steps:
@@ -491,6 +491,7 @@ jobs:
491491
pull-requests: write # for writing comments
492492
issues: write # for writing comments
493493
contents: write # for creating a release
494+
id-token: write # Required for OIDC
494495
name: Publish
495496
runs-on: ubuntu-latest
496497
timeout-minutes: 15
@@ -509,8 +510,10 @@ jobs:
509510
- name: Setup Node
510511
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
511512
with:
512-
node-version: ${{ matrix.node }}
513-
check-latest: true
513+
node-version: 24
514+
registry-url: 'https://registry.npmjs.org'
515+
- name: Update npm for publishing
516+
run: npm install -g npm@latest
514517
- name: Install and Cache Node Dependencies
515518
uses: ./.github/actions/install-and-cache-node-deps
516519
- name: Download all artifacts
@@ -528,12 +531,10 @@ jobs:
528531
if git --no-pager log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
529532
then
530533
echo "Publishing regular release"
531-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
532534
npm publish --access public
533535
elif git --no-pager log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+-[0-9]\+$";
534536
then
535537
echo "Publishing beta release"
536-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
537538
npm publish --tag beta --access public
538539
else
539540
echo "Not a release, skipping publish"

browser/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"name": "@rollup/browser",
3-
"version": "4.52.3",
3+
"version": "4.52.4-3",
44
"description": "Next-generation ES module bundler browser build",
55
"main": "dist/rollup.browser.js",
66
"module": "dist/es/rollup.browser.js",
77
"types": "dist/rollup.browser.d.ts",
8-
"repository": "rollup/rollup",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/rollup/rollup.git"
11+
},
912
"keywords": [
1013
"modules",
1114
"bundler",

npm/android-arm-eabi/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.android-arm-eabi.node"
1922
}

npm/android-arm64/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.android-arm64.node"
1922
}

npm/darwin-arm64/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.darwin-arm64.node"
1922
}

npm/darwin-x64/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.darwin-x64.node"
1922
}

npm/freebsd-arm64/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.freebsd-arm64.node"
1922
}

npm/freebsd-x64/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"main": "./rollup.freebsd-x64.node"
1922
}

npm/linux-arm-gnueabihf/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"libc": [
1922
"glibc"
2023
],

npm/linux-arm-musleabihf/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"author": "Lukas Taegert-Atkinson",
1515
"homepage": "https://rollupjs.org/",
1616
"license": "MIT",
17-
"repository": "rollup/rollup",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/rollup/rollup.git"
20+
},
1821
"libc": [
1922
"musl"
2023
],

0 commit comments

Comments
 (0)