Skip to content

Commit feb3577

Browse files
Update release.yml
1 parent 01baa7b commit feb3577

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,34 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
publish:
912
runs-on: ubuntu-latest
13+
1014
steps:
1115
- name: Checkout code
12-
uses: actions/checkout@v2
13-
16+
uses: actions/checkout@v4
17+
1418
- name: Set up Node.js
15-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
1620
with:
17-
node-version: '16'
21+
node-version: '20'
1822
registry-url: 'https://registry.npmjs.org/'
23+
scope: '@qomponent'
1924

2025
- name: Install dependencies
21-
run: npm install
26+
run: npm ci
2227

2328
- name: Update version in package.json
2429
run: |
25-
RELEASE_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
26-
npm version $RELEASE_VERSION --no-git-tag-version
30+
RELEASE_VERSION="${{ github.event.release.tag_name }}"
31+
RELEASE_VERSION="${RELEASE_VERSION#v}"
32+
npm version "$RELEASE_VERSION" --no-git-tag-version
2733
2834
- name: Publish to npm
29-
run: npm publish
35+
run: npm publish --access public
3036
env:
3137
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)