Skip to content

Commit df024a5

Browse files
committed
testing out new workflows
hopefully this won't destroy releases lol
1 parent a6a0776 commit df024a5

File tree

3 files changed

+142
-90
lines changed

3 files changed

+142
-90
lines changed

.github/workflows/mobile-release.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,60 @@ name: Mobile Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
prerelease:
7+
description: 'Mark as a pre-release? (true/false)'
8+
default: 'false'
9+
required: false
510

611
permissions:
712
contents: write
813

14+
env:
15+
TAG_NAME: nightly-${{ github.run_number }}
16+
917
jobs:
10-
get-latest-tag:
18+
create-nightly-tag:
1119
runs-on: ubuntu-latest
12-
outputs:
13-
latest_tag: ${{ steps.get_tag.outputs.LATEST_TAG }}
1420
steps:
15-
- name: Get latest release tag
16-
id: get_tag
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: Create and push tag
1725
run: |
18-
latest_tag=$(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .tag_name)
19-
echo "Latest tag is $latest_tag"
20-
echo "::set-output name=LATEST_TAG::$latest_tag"
26+
git config --global user.name "${{ github.actor }}"
27+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
28+
git tag ${{ env.TAG_NAME }}
29+
git push origin ${{ env.TAG_NAME }}
2130
2231
build:
2332
name: Build
33+
needs: create-nightly-tag
2434
uses: ./.github/workflows/mobile.yml
2535
with:
2636
buildFlags: officialBuild
2737

2838
release-android:
29-
name: Release androidBuild
30-
needs: [get-latest-tag, build]
39+
name: Release Android Build
40+
needs: [build]
3141
runs-on: ubuntu-latest
3242
steps:
3343
- name: Download Android artifact
3444
uses: actions/download-artifact@main
3545
with:
3646
name: androidBuild
37-
- name: Upload androidBuild to release
47+
- name: Upload Android Build to Release
3848
uses: svenstaro/[email protected]
3949
with:
4050
repo_token: ${{ secrets.GITHUB_TOKEN }}
41-
tag: ${{ needs.get-latest-tag.outputs.latest_tag }}
51+
tag: ${{ env.TAG_NAME }}
4252
file: JSEngine-release.apk
4353
asset_name: FNF-JS-Engine-android.apk
4454
overwrite: false
4555

4656
release-ios:
47-
name: Release iOSBuild
48-
needs: [get-latest-tag, build]
57+
name: Release iOS Build
58+
needs: [build]
4959
runs-on: ubuntu-latest
5060
steps:
5161
- name: Download iOS artifact
@@ -54,11 +64,11 @@ jobs:
5464
name: iOSBuild
5565
- name: Zip For Release
5666
run: zip -r JSEngine-iOS.zip JSEngine.ipa
57-
- name: Upload iOSBuild to release
67+
- name: Upload iOS Build to Release
5868
uses: svenstaro/[email protected]
5969
with:
6070
repo_token: ${{ secrets.GITHUB_TOKEN }}
61-
tag: ${{ needs.get-latest-tag.outputs.latest_tag }}
71+
tag: ${{ env.TAG_NAME }}
6272
file: JSEngine-iOS.zip
6373
asset_name: FNF-JS-Engine-iOS.zip
6474
overwrite: false

.github/workflows/release.yml

Lines changed: 115 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
1-
name: Release
1+
name: Manual Release
22

33
on:
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

714
permissions:
815
contents: write
916

1017
jobs:
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-
uses: svenstaro/[email protected]
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+
uses: svenstaro/[email protected]
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-
uses: svenstaro/[email protected]
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+
uses: svenstaro/[email protected]
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-
uses: svenstaro/[email protected]
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-
uses: svenstaro/[email protected]
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+
uses: svenstaro/[email protected]
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+
uses: svenstaro/[email protected]
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

source/HealthIcon.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class HealthIcon extends FlxSprite
6868
}
6969
var iSize:Float = Math.round(file.width / file.height);
7070
// TODO: clean up this fucking mess
71-
if (iconMeta?.useLegacySystem || (file.width / file.height >= 2)
71+
if (iconMeta?.useLegacySystem || (file.width / file.height >= 2))
7272
{
7373
if (file.width / file.height >= 2)
7474
iSize = Math.floor(file.width / 2);

0 commit comments

Comments
 (0)