File tree 2 files changed +44
-0
lines changed
2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Tag & Release Version
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ create-release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+
14
+ - name : Use Node.js
15
+ uses : actions/setup-node@v3
16
+ with :
17
+ node-version : ' 20'
18
+
19
+ - name : Create Tag
20
+ id : create_tag
21
+ env :
22
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
+ run : |
24
+ # Read version from version.json
25
+ version=$(node -p "require('./version.json').version")
26
+ version_tag="v$version"
27
+ echo "Version from version.json: $version_tag"
28
+ echo "version=$version_tag" >> $GITHUB_OUTPUT
29
+ git tag $version_tag
30
+ git push origin $version_tag
31
+
32
+ - name : Create GitHub Release
33
+ uses : ncipollo/release-action@v1
34
+ with :
35
+ tag : ${{ steps.create_tag.outputs.version }}
36
+ name : Release ${{ steps.create_tag.outputs.version }}
37
+ body : Automated release for version ${{ steps.create_tag.outputs.version }}.
38
+ draft : false
39
+ prerelease : false
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 2.21.0"
3
+ }
You can’t perform that action at this time.
0 commit comments