File tree Expand file tree Collapse file tree 2 files changed +41
-9
lines changed
Expand file tree Collapse file tree 2 files changed +41
-9
lines changed Original file line number Diff line number Diff line change 1+ const fxManifest = await Bun . file ( './fxmanifest.lua' ) . text ( ) ;
2+
3+ let newVersion = process . env . TGT_RELEASE_VERSION ;
4+ newVersion = newVersion . replace ( 'v' , '' )
5+
6+ const newFileContent = fxManifest . replace ( / \b v e r s i o n \s + ( .* ) $ / gm, `version '${ newVersion } '` ) ;
7+
8+ await Bun . write ( './fxmanifest.lua' , newFileContent ) ;
Original file line number Diff line number Diff line change 1- name : Create new release
1+ name : Create release
22
33on :
44 workflow_dispatch :
77 - ' v*.*.*'
88
99jobs :
10- release :
10+ create- release :
1111 runs-on : ubuntu-latest
1212 steps :
13+ - name : Install zip
14+ run : sudo apt install zip
15+
16+ - name : Install Bun
17+ uses : oven-sh/setup-bun@v2
18+ with :
19+ bun-version : latest
20+
21+
1322 - name : Get latest code
1423 uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+ ref : ${{ github.event.repository.default_branch }}
1527
16- - name : Update tag
17- uses : EndBug/latest-tag@v1
28+
29+ - name : Bump manifest version
30+ run : bun run .github/actions/bump-manifest-version.js
31+ env :
32+ TGT_RELEASE_VERSION : ${{ github.ref_name }}
33+
34+ - name : Push version bump change
35+ uses : EndBug/add-and-commit@v9
1836 with :
19- ref : ${{ github.ref_name }}
37+ add : fxmanifest.lua
38+ push : true
39+ default_author : github_actions
40+ message : ' chore: bump version to ${{ github.ref_name }}'
2041
21- - name : Install zip
22- run : sudo apt install zip
2342
2443 - name : Bundle files
2544 run : |
2948 cd ./temp && zip -r ../ac_radio.zip ./ac_radio
3049
3150 - name : Create release
32- uses : softprops /action-gh-release@v2
51+ uses :
' marvinpinto /action-[email protected] ' 3352 with :
34- token : ${{ github.token }}
53+ repo_token : ${{ github.token }}
3554 prerelease : false
3655 files : ac_radio.zip
56+
57+ - name : Update tag
58+ uses : EndBug/latest-tag@v1
59+ with :
60+ ref : ${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments