Skip to content

Commit e407f26

Browse files
update workflow
1 parent 57d0c67 commit e407f26

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
name: CI
55

6-
permissions:
7-
contents: write
8-
pull-requests: write
96
on:
107
push:
118
branches:
@@ -22,9 +19,7 @@ jobs:
2219

2320
strategy:
2421
matrix:
25-
node-version:
26-
- 20.x
27-
- 22.x
22+
node-version: [20, 22]
2823

2924
steps:
3025
- uses: actions/checkout@v6
@@ -61,39 +56,47 @@ jobs:
6156
npm-publish-build:
6257
needs: build
6358
runs-on: ubuntu-latest
59+
permissions:
60+
id-token: write
61+
contents: read
6462
steps:
6563
- uses: actions/download-artifact@v7
6664
with:
6765
name: build
6866
- uses: actions/setup-node@v6
6967
with:
70-
node-version: 20.x
68+
node-version: 20
69+
registry-url: 'https://registry.npmjs.org'
70+
- name: Update npm to latest (required for OIDC)
71+
run: npm install -g npm@latest
7172
- uses: rlespinasse/github-slug-action@v3.x
7273
- name: Append commit hash to package version
7374
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
7475
- name: Disable pre- and post-publish actions
7576
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
76-
- uses: JS-DevTools/npm-publish@v4.1.4
77+
- name: Publish to npm
7778
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
78-
with:
79-
token: ${{ secrets.NPM_TOKEN }}
80-
tag: ${{ env.GITHUB_REF_SLUG }}
79+
run: npm publish --tag ${{ env.GITHUB_REF_SLUG }}
8180

8281
npm-publish-latest:
8382
needs: [build, npm-publish-build]
8483
runs-on: ubuntu-latest
8584
if: github.ref == 'refs/heads/main'
85+
permissions:
86+
id-token: write # Required for OIDC
87+
contents: read
8688
steps:
8789
- uses: actions/download-artifact@v7
8890
with:
8991
name: build
9092
- uses: actions/setup-node@v6
9193
with:
92-
node-version: 20.x
94+
node-version: 20
95+
registry-url: 'https://registry.npmjs.org'
96+
- name: Update npm to latest (required for OIDC)
97+
run: npm install -g npm@latest
9398
- name: Disable pre- and post-publish actions
9499
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
95-
- uses: JS-DevTools/npm-publish@v4.1.4
100+
- name: Publish to npm
96101
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
97-
with:
98-
token: ${{ secrets.NPM_TOKEN }}
99-
tag: latest
102+
run: npm publish --tag latest

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"repository": {
2222
"type": "git",
23-
"url": "git+https://github.com/solid/source-pane.git"
23+
"url": "git+https://github.com/SolidOS/source-pane.git"
2424
},
2525
"keywords": [
2626
"solid",

0 commit comments

Comments
 (0)