ci fix - separate artifact for each os #126
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
name: build | |
on: | |
push: | |
branches: [ "*" ] # This will trigger the workflow on push to any branch | |
pull_request: | |
branches: [ "*" ] # This will trigger the workflow on pull requests to any branch | |
jobs: | |
apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: '${{ github.ref }}' | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assembleAndroidFdroidRelease | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: '**/*.apk' | |
desktop: | |
name: Build Desktop Bundles | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: '${{ github.ref }}' | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' # Use the latest version of Python 3 | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install lxml | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build Desktop Bundles with Gradle | |
run: ./gradlew -c settings.desktop.gradle buildAllBundles --no-configuration-cache | |
- name: Upload Desktop Bundles | |
run: | | |
for bundle in dist/*; do | |
bundle_name=$(basename "$bundle") | |
echo "Uploading $bundle_name..." | |
gh release upload ${{ github.ref }} "$bundle" --clobber | |
done |