File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish
2
-
3
2
on :
4
3
release :
5
4
types : published
5
+ permissions :
6
+ contents : write
6
7
7
8
jobs :
8
9
build :
@@ -11,15 +12,12 @@ jobs:
11
12
outputs :
12
13
tag : ${{ steps.update-package-version.outputs.version }}
13
14
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
18
16
- name : Configure git
19
17
run : |
20
18
git config user.name 'Release Action'
21
19
git config user.email '<>'
22
- - uses : actions/setup-node@v4
20
+ - uses : actions/setup-node@v5
23
21
with :
24
22
node-version : 20
25
23
31
29
run : |
32
30
git tag -d "${{ github.event.release.tag_name }}"
33
31
VERSION=$(npm version "${{ github.event.release.tag_name }}" --no-git-tag-version)
34
- echo "::set-output name=version::$VERSION"
35
32
git add package.json package-lock.json
36
33
git commit -m "[skip ci] Bump $VERSION"
37
34
git push origin HEAD:main
47
44
id : release_info
48
45
run : |
49
46
# Check for semantic versioning
50
- echo "Preparing release for version $longVersion"
51
47
longVersion="${{github.event.release.tag_name}}"
48
+ echo "Preparing release for version $longVersion"
52
49
[[ $longVersion == v[0-9]*.[0-9]*.[0-9]* ]] || (echo "must follow semantic versioning" && exit 1)
53
50
majorVersion=$(echo ${longVersion%.*.*})
54
51
minorVersion=$(echo ${longVersion%.*})
You can’t perform that action at this time.
0 commit comments