Skip to content

Commit 12e2370

Browse files
fix findings and update release workflow
1 parent c9a570a commit 12e2370

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Publish
2-
32
on:
43
release:
54
types: published
5+
permissions:
6+
contents: write
67

78
jobs:
89
build:
@@ -11,15 +12,12 @@ jobs:
1112
outputs:
1213
tag: ${{ steps.update-package-version.outputs.version }}
1314
steps:
14-
# Configure runner with the right stuff
15-
- uses: actions/checkout@v4
16-
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: actions/checkout@v5
1816
- name: Configure git
1917
run: |
2018
git config user.name 'Release Action'
2119
git config user.email '<>'
22-
- uses: actions/setup-node@v4
20+
- uses: actions/setup-node@v5
2321
with:
2422
node-version: 20
2523

@@ -31,7 +29,6 @@ jobs:
3129
run: |
3230
git tag -d "${{ github.event.release.tag_name }}"
3331
VERSION=$(npm version "${{ github.event.release.tag_name }}" --no-git-tag-version)
34-
echo "::set-output name=version::$VERSION"
3532
git add package.json package-lock.json
3633
git commit -m "[skip ci] Bump $VERSION"
3734
git push origin HEAD:main
@@ -47,8 +44,8 @@ jobs:
4744
id: release_info
4845
run: |
4946
# Check for semantic versioning
50-
echo "Preparing release for version $longVersion"
5147
longVersion="${{github.event.release.tag_name}}"
48+
echo "Preparing release for version $longVersion"
5249
[[ $longVersion == v[0-9]*.[0-9]*.[0-9]* ]] || (echo "must follow semantic versioning" && exit 1)
5350
majorVersion=$(echo ${longVersion%.*.*})
5451
minorVersion=$(echo ${longVersion%.*})

0 commit comments

Comments
 (0)