-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
395e6a3
commit c481d92
Showing
4 changed files
with
114 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,13 @@ | ||
name: Build Android | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.19.5' | ||
|
||
- name: Decode Keystore File | ||
env: | ||
KEYSTORE: ${{ secrets.KEYSTORE }} | ||
run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks | ||
|
||
- name: Create key.properties | ||
run: | | ||
echo "storeFile=key.jks" > android/key.properties | ||
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties | ||
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | ||
echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | ||
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | ||
echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | ||
- name: Setup Flutter | ||
run: | | ||
flutter config --no-analytics | ||
flutter pub get | ||
- name: Build APK | ||
run: | | ||
flutter build apk --split-per-abi | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-android-apk | ||
path: build/app/outputs/apk/release | ||
|
||
- name: Build appbundle | ||
run: | | ||
flutter build appbundle | ||
- name: Upload AAB | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-android-aab | ||
path: build/app/outputs/bundle/release/app-release.aab | ||
uses: ./.github/workflows/reusable-build-android.yml | ||
with: | ||
flutter_version: '3.19.5' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,13 @@ | ||
name: Build Windows | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.19.5' | ||
|
||
- name: Install dependencies | ||
run: | | ||
choco install -y cmake ninja | ||
- name: Install Vulkan SDK | ||
uses: humbletim/[email protected] | ||
with: | ||
version: latest | ||
cache: true | ||
|
||
- name: Build Windows App | ||
run: | | ||
flutter pub get | ||
flutter build windows | ||
- name: Upload Windows Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-windows | ||
path: build/windows/x64/bundle | ||
uses: ./.github/workflows/reusable-build-windows.yml | ||
with: | ||
flutter_version: '3.19.5' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Reusable Build Android | ||
on: | ||
workflow_call: | ||
inputs: | ||
flutter_version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ inputs.flutter_version }} | ||
|
||
- name: Decode Keystore File | ||
env: | ||
KEYSTORE: ${{ secrets.KEYSTORE }} | ||
run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks | ||
|
||
- name: Create key.properties | ||
run: | | ||
echo "storeFile=key.jks" > android/key.properties | ||
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties | ||
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | ||
echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | ||
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | ||
echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | ||
- name: Setup Flutter | ||
run: | | ||
flutter config --no-analytics | ||
flutter pub get | ||
- name: Build APK | ||
run: | | ||
flutter build apk --split-per-abi | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-android-apk | ||
path: build/app/outputs/apk/release | ||
|
||
- name: Build appbundle | ||
run: | | ||
flutter build appbundle | ||
- name: Upload AAB | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-android-aab | ||
path: build/app/outputs/bundle/release/app-release.aab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Reusable Build Windows | ||
on: | ||
workflow_call: | ||
inputs: | ||
flutter_version: | ||
required: true | ||
type: string | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ inputs.flutter_version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
choco install -y cmake ninja | ||
- name: Install Vulkan SDK | ||
uses: humbletim/[email protected] | ||
with: | ||
version: latest | ||
cache: true | ||
|
||
- name: Build Windows App | ||
run: | | ||
flutter pub get | ||
flutter build windows | ||
- name: Upload Windows Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-windows | ||
path: build/windows/x64/bundle |