Skip to content

Commit 43d9362

Browse files
committed
feat(workflows): add nightly build workflow
1 parent 713c25c commit 43d9362

File tree

2 files changed

+54
-4
lines changed

2 files changed

+54
-4
lines changed

.github/workflows/build-apps.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ on:
3232
options:
3333
- release
3434
- development
35+
workflow_call:
36+
inputs:
37+
platform:
38+
required: false
39+
default: 'both'
40+
type: string
41+
android_profile:
42+
required: false
43+
default: 'production'
44+
type: string
45+
ios_build_type:
46+
required: false
47+
default: 'release'
48+
type: string
49+
build_suffix:
50+
required: false
51+
default: ''
52+
type: string
3553

3654
jobs:
3755
build-android:
@@ -87,7 +105,7 @@ jobs:
87105
- name: Upload APK artifact
88106
uses: actions/upload-artifact@v4
89107
with:
90-
name: android-release-${{ github.ref_name }}
108+
name: android-release-${{ github.ref_name }}${{ inputs.build_suffix }}
91109
path: build-*.apk
92110

93111
build-ios:
@@ -165,10 +183,10 @@ jobs:
165183
run: |
166184
mkdir Payload
167185
cp -r build/nekofin.xcarchive/Products/Applications/nekofin.app Payload
168-
zip -r nekofin-iOS_${{ github.ref_name }}${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && '-dev' || '' }}.ipa Payload
186+
zip -r nekofin-iOS_${{ github.ref_name }}${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && '-dev' || '' }}${{ inputs.build_suffix }}.ipa Payload
169187
170188
- name: Upload App Artifact
171189
uses: actions/upload-artifact@v4
172190
with:
173-
name: ios-${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && 'development' || 'release' }}-${{ github.ref_name }}
174-
path: nekofin-iOS_${{ github.ref_name }}${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && '-dev' || '' }}.ipa
191+
name: ios-${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && 'development' || 'release' }}-${{ github.ref_name }}${{ inputs.build_suffix }}
192+
path: nekofin-iOS_${{ github.ref_name }}${{ (github.event_name == 'workflow_dispatch' && inputs.ios_build_type == 'development') && '-dev' || '' }}${{ inputs.build_suffix }}.ipa

.github/workflows/nightly.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Nightly Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
get-commit-info:
11+
name: Get Commit Info
12+
runs-on: ubuntu-latest
13+
outputs:
14+
sha_short: ${{ steps.commit.outputs.sha_short }}
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Get commit SHA
20+
id: commit
21+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
22+
23+
call-build-workflow:
24+
name: Call Build Apps Workflow
25+
needs: get-commit-info
26+
uses: ./.github/workflows/build-apps.yml
27+
with:
28+
platform: both
29+
android_profile: production
30+
ios_build_type: release
31+
build_suffix: _nightly-${{ needs.get-commit-info.outputs.sha_short }}
32+
secrets: inherit

0 commit comments

Comments
 (0)