1- name : Release
1+ name : Manual Release
22
33on :
4- release :
5- types : [ published ]
4+ workflow_dispatch :
5+ inputs :
6+ # tag:
7+ # description: 'Tag for this release (e.g., v1.0.0)'
8+ # required: true
9+ prerelease :
10+ description : ' Mark as a pre-release? (true/false)'
11+ default : ' false'
12+ required : false
613
714permissions :
815 contents : write
916
1017jobs :
18+ ensure-tag :
19+ name : Create Tag (if needed)
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+
25+ - name : Fetch all tags
26+ run : git fetch --tags
27+
28+ - name : Set tag name
29+ id : tagger
30+ run : echo "tag_name=nightly-${{ github.run_number }}" >> $GITHUB_OUTPUT
31+
32+ - name : Create and push tag
33+ run : |
34+ git config --global user.name "${{ github.actor }}"
35+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
36+ git tag ${{ steps.tagger.outputs.tag_name }}
37+ git push origin ${{ steps.tagger.outputs.tag_name }}
38+
1139 build :
12- name : Build
40+ name : Build Artifacts
41+ needs : ensure-tag
1342 uses : ./.github/workflows/main.yml
1443 with :
1544 buildFlags : officialBuild
@@ -19,84 +48,97 @@ jobs:
1948 needs : build
2049 runs-on : ubuntu-latest
2150 steps :
22- - name : Download Linux artifact
23- uses : actions/download-artifact@main
24- with :
25- path : build
26- name : linuxBuild
27- - name : Compress build
28- run : |
29- sudo apt-get install p7zip-full
30- 7z a -tzip build.zip -w ./build/.
31- - name : Upload linuxBuild to release
32- 33- with :
34- repo_token : ${{ secrets.GITHUB_TOKEN }}
35- tag : ${{ github.ref_name }}
36- file : build.zip
37- asset_name : FNF-JS-Engine-linux.zip
38- overwrite : false
51+ - name : Download Linux artifact
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : linuxBuild
55+ path : build
56+
57+ - name : Compress build
58+ run : |
59+ sudo apt-get install -y p7zip-full
60+ 7z a -tzip linuxBuild.zip -w ./build/.
61+
62+ - name : Upload to GitHub Release
63+ 64+ with :
65+ repo_token : ${{ secrets.GITHUB_TOKEN }}
66+ tag : ${{ github.event.inputs.tag }}
67+ file : linuxBuild.zip
68+ asset_name : FNF-JS-Engine-linux.zip
69+ prerelease : ${{ github.event.inputs.prerelease == 'true' }}
70+ overwrite : true
3971
4072 release-windows :
4173 name : Release windowsBuild
4274 needs : build
4375 runs-on : ubuntu-latest
4476 steps :
45- - name : Download Windows artifact
46- uses : actions/download-artifact@main
47- with :
48- path : build
49- name : windowsBuild
50- - name : Compress build
51- run : |
52- sudo apt-get install p7zip-full
53- 7z a -tzip build.zip -w ./build/.
54- - name : Upload windowsBuild to release
55- 56- with :
57- repo_token : ${{ secrets.GITHUB_TOKEN }}
58- tag : ${{ github.ref_name }}
59- file : build.zip
60- asset_name : FNF-JS-Engine-windows.zip
61- overwrite : false
77+ - name : Download Windows artifact
78+ uses : actions/download-artifact@v4
79+ with :
80+ name : windowsBuild
81+ path : build
82+
83+ - name : Compress build
84+ run : |
85+ sudo apt-get install -y p7zip-full
86+ 7z a -tzip windowsBuild.zip -w ./build/.
87+
88+ - name : Upload to GitHub Release
89+ 90+ with :
91+ repo_token : ${{ secrets.GITHUB_TOKEN }}
92+ tag : ${{ github.event.inputs.tag }}
93+ file : windowsBuild.zip
94+ asset_name : FNF-JS-Engine-windows.zip
95+ prerelease : ${{ github.event.inputs.prerelease == 'true' }}
96+ overwrite : true
6297
6398 release-mac :
6499 name : Release macBuild
65100 needs : build
66101 runs-on : ubuntu-latest
67102 steps :
68- - name : Download Mac Intel artifact
69- uses : actions/download-artifact@main
70- with :
71- path : build
72- name : macBuild-intel
73- - name : Compress build
74- run : |
75- sudo apt-get install p7zip-full
76- 7z a -tzip buildIntel.zip -w ./build/.
77- rm -rf ./build
78- - name : Download Mac ARM artifact
79- uses : actions/download-artifact@main
80- with :
81- path : build
82- name : macBuild-arm
83- - name : Compress build
84- run : |
85- 7z a -tzip buildARM.zip -w ./build/.
86- rm -rf ./build
87- - name : Upload macBuild-intel to release
88- 89- with :
90- repo_token : ${{ secrets.GITHUB_TOKEN }}
91- tag : ${{ github.ref_name }}
92- file : buildIntel.zip
93- asset_name : FNF-JS-Engine-macOS-Intel.zip
94- overwrite : false
95- - name : Upload macBuild-arm to release
96- 97- with :
98- repo_token : ${{ secrets.GITHUB_TOKEN }}
99- tag : ${{ github.ref_name }}
100- file : buildARM.zip
101- asset_name : FNF-JS-Engine-macOS-ARM.zip
102- overwrite : false
103+ - name : Download Mac Intel artifact
104+ uses : actions/download-artifact@v4
105+ with :
106+ name : macBuild-intel
107+ path : build
108+
109+ - name : Compress Intel build
110+ run : |
111+ sudo apt-get install -y p7zip-full
112+ 7z a -tzip macBuild-intel.zip -w ./build/
113+ rm -rf ./build
114+
115+ - name : Download Mac ARM artifact
116+ uses : actions/download-artifact@v4
117+ with :
118+ name : macBuild-arm
119+ path : build
120+
121+ - name : Compress ARM build
122+ run : |
123+ 7z a -tzip macBuild-arm.zip -w ./build/
124+ rm -rf ./build
125+
126+ - name : Upload macBuild-intel
127+ 128+ with :
129+ repo_token : ${{ secrets.GITHUB_TOKEN }}
130+ tag : ${{ github.event.inputs.tag }}
131+ file : macBuild-intel.zip
132+ asset_name : FNF-JS-Engine-macOS-Intel.zip
133+ prerelease : ${{ github.event.inputs.prerelease == 'true' }}
134+ overwrite : true
135+
136+ - name : Upload macBuild-arm
137+ 138+ with :
139+ repo_token : ${{ secrets.GITHUB_TOKEN }}
140+ tag : ${{ github.event.inputs.tag }}
141+ file : macBuild-arm.zip
142+ asset_name : FNF-JS-Engine-macOS-ARM.zip
143+ prerelease : ${{ github.event.inputs.prerelease == 'true' }}
144+ overwrite : true
0 commit comments