Skip to content

Commit 14206d3

Browse files
committed
DOPS-1719 Implement npmjs publishing using OIDC
1 parent 53ddb51 commit 14206d3

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install pnpm
1414
uses: pnpm/action-setup@v2
1515
with:
16-
version: 8
16+
version: 10
1717

1818
- name: Setup Node
1919
uses: actions/setup-node@v3

.github/workflows/publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ on:
99
jobs:
1010
publish-to-npm:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
1215
steps:
1316
- name: Checkout
1417
uses: actions/checkout@v3
1518

1619
- name: Install pnpm
1720
uses: pnpm/action-setup@v2
1821
with:
19-
version: 8
22+
version: 10
2023

2124
- uses: actions/setup-node@v3
2225
with:
@@ -25,6 +28,10 @@ jobs:
2528
scope: ${{ github.repository_owner }}
2629
cache: pnpm
2730

31+
# pnpm uses npm under the hood, so we need to upgrade it to the latest version to suport OIDC
32+
- name: Install npm@11
33+
run: npm install -g npm@11
34+
2835
- name: Install dependencies
2936
run: pnpm install --frozen-lockfile
3037

@@ -34,8 +41,6 @@ jobs:
3441
- name: Publish 🚀
3542
run: pnpm publish --no-git-checks --access=public
3643
working-directory: dist
37-
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3944

4045
publish-to-github:
4146
runs-on: ubuntu-latest
@@ -49,7 +54,7 @@ jobs:
4954
- name: Install pnpm
5055
uses: pnpm/action-setup@v2
5156
with:
52-
version: 8
57+
version: 10
5358

5459
- uses: actions/setup-node@v3
5560
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install pnpm
3131
uses: pnpm/action-setup@v2
3232
with:
33-
version: 8
33+
version: 10
3434

3535
- name: Setup Node
3636
uses: actions/setup-node@v3

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1inch/byte-utils",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "Contains helpers to work with bytes",
55
"author": "@1inch",
66
"license": "MIT",

0 commit comments

Comments
 (0)