Skip to content

Commit 05e0c3a

Browse files
committed
ci(release): enhance npm publishing and release workflow configuration
1 parent 4b15b7a commit 05e0c3a

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ jobs:
4747
with:
4848
node-version: 22
4949
cache: 'npm'
50-
registry-url: 'https://registry.npmjs.org'
51-
always-auth: true
50+
51+
- name: Update npm
52+
run: npm install -g npm@latest
5253

5354
- name: Install dependencies
5455
run: npm ci
@@ -63,8 +64,6 @@ jobs:
6364
DEBUG: release-it:*,@release-it/*
6465
HUSKY: 0
6566
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
67-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6867
run: |
6968
VERSION_ARG=""
7069
if [ -n "${{ inputs.version }}" ]; then
@@ -83,7 +82,7 @@ jobs:
8382
fi
8483
NPM_TAG_ARG="--npm.tag=${NPM_TAG}"
8584
86-
npm run release -- --ci $PREID_ARG $NPM_TAG_ARG $VERSION_ARG
85+
npx release-it --ci $PREID_ARG $NPM_TAG_ARG $VERSION_ARG
8786
8887
- name: Sync main → develop
8988
uses: devmasx/merge-branch@v1.4.0

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ coverage
2525
*.ntvs*
2626
*.njsproj
2727
*.sln
28-
*.sw?
28+
*.sw?
29+
30+
.npmrc

.release-it.cjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ module.exports = () => {
139139

140140
npm: {
141141
publish: true,
142+
skipChecks: true,
143+
provenance: true,
144+
access: "public",
145+
registry: "https://registry.npmjs.org/",
142146
versionArgs: ["--no-git-tag-version"],
143-
publishArgs: ["--provenance", "--access", "public"],
144147
},
145148

146149
plugins: {

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
],
1717
"repository": {
1818
"type": "git",
19-
"url": "https://github.com/addon-stack/plugin-remote-config"
19+
"url": "git+https://github.com/addon-stack/plugin-remote-config.git"
20+
},
21+
"publishConfig": {
22+
"access": "public",
23+
"provenance": true
2024
},
2125
"homepage": "https://github.com/addon-stack/plugin-remote-config",
2226
"bugs": {

0 commit comments

Comments
 (0)