Skip to content

Commit a1c192c

Browse files
committed
DOPS-1719 Implement npmjs publishing using OIDC, try manual token exhange
1 parent d3b666c commit a1c192c

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,24 @@ jobs:
2929
cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
3030
cat package.json
3131
32-
- name: Install dependencies
33-
run: yarn install --frozen-lockfile
32+
# - name: Install dependencies
33+
# run: yarn install --frozen-lockfile
3434

35-
- name: Build
36-
run: yarn build
35+
# - name: Build
36+
# run: yarn build
37+
38+
# Workaround for old version of package managers (like yarn v1) that do not support OIDC natively
39+
- name: Exchange OIDC token for short-lived npm token
40+
id: exchange
41+
run: |
42+
PKG_NAME=$(jq -r .name package.json)
43+
curl -v -sSL -H "Authorization: Bearer $ID_TOKEN" "https://registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/${PKG_NAME}
3744
38-
- name: Publish
39-
# Use NPM since npmjs OIDC requires support in package manager
40-
run: npm publish
41-
working-directory: dist
45+
# - name: Publish
46+
# run: yarn publish
47+
# working-directory: dist
48+
# env:
49+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4250

4351
publish-to-github:
4452
runs-on: ubuntu-latest
@@ -69,8 +77,8 @@ jobs:
6977
- name: Build
7078
run: yarn build
7179

72-
- name: Publish
73-
run: yarn publish
74-
working-directory: dist
75-
env:
76-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
# - name: Publish
81+
# run: yarn publish
82+
# working-directory: dist
83+
# env:
84+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1inch/multicall",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "High-weight optimized call-processor",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)