Skip to content

Commit 2342d68

Browse files
committed
chore(npm): fix publish
1 parent 1d7d6a5 commit 2342d68

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

.github/workflows/release-publish.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- v*.*
77

88
permissions:
9-
id-token: write # Required for OIDC token generation
9+
id-token: write
10+
contents: write
1011

1112
concurrency:
1213
cancel-in-progress: true
@@ -17,30 +18,27 @@ jobs:
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Checkout
20-
uses: actions/checkout@v3
21+
uses: actions/checkout@v6
2122

22-
- uses: actions/setup-node@v3
23+
- uses: actions/setup-node@v6
2324
with:
2425
node-version: 20
2526
cache: 'yarn'
26-
27+
registry-url: 'https://registry.npmjs.org'
28+
2729
- name: yarn install
28-
shell: bash
2930
run: yarn --immutable
3031

3132
- name: build with ncc
32-
shell: bash
3333
run: yarn workspace kontinuous build
3434

3535
- name: prepublish
36-
shell: bash
3736
run: |
3837
cp LICENSE README.md packages/kontinuous/
3938
cat <<< $(jq "del(.dependencies, .devDependencies, .scripts, .main)" packages/kontinuous/package.json) > packages/kontinuous/package.json
40-
39+
4140
- name: extract npm tag
4241
id: npm-tag
43-
shell: bash
4442
run: |
4543
if [[ "$GITHUB_REF" == *"alpha"* ]]; then
4644
npm_tag="alpha"
@@ -51,17 +49,9 @@ jobs:
5149
fi
5250
echo "tag=$npm_tag" >> $GITHUB_OUTPUT
5351
54-
- id: publish-kontinuous
55-
uses: JS-DevTools/npm-publish@v2
56-
with:
57-
token: ${{ secrets.SOCIALGROOVYBOT_NPM_TOKEN }}
58-
package: packages/kontinuous/package.json
59-
tag: ${{ steps.npm-tag.outputs.tag }}
60-
61-
- if: steps.publish-kontinuous.outputs.type
62-
run: |
63-
echo "Version changed: ${{ steps.publish-kontinuous.outputs.old-version }} => ${{ steps.publish-kontinuous.outputs.version }}"
64-
52+
- name: Publish to npm
53+
run: npm publish packages/kontinuous --tag ${{ steps.npm-tag.outputs.tag }} --provenance --access public
54+
6555
- name: Get GitHub App Token
6656
id: token
6757
uses: SocialGouv/token-bureau@main
@@ -70,7 +60,7 @@ jobs:
7060
audience: socialgouv
7161

7262
- name: Release
73-
uses: softprops/action-gh-release@v1
63+
uses: softprops/action-gh-release@v2
7464
if: startsWith(github.ref, 'refs/tags/')
7565
with:
7666
token: ${{ steps.token.outputs.token }}

0 commit comments

Comments
 (0)