Skip to content

Release 2.1.12

Release 2.1.12 #57

Workflow file for this run

name: Build and Deploy
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
env:
PUB_SUMMARY_ONLY: true
KOTLIN_VERSION: "2.1.0"
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Create brandon user directory structure (match F-Droid)
run: |
sudo mkdir -p /home/brandon
sudo chown $USER -R /home/brandon
- name: Move project to F-Droid location
run: |
cd ..
mv ${{ github.event.repository.name }} /home/brandon/flexify
- name: Setup Flutter from submodule and get dependencies
working-directory: /home/brandon/flexify
run: |
git submodule update --init --recursive flutter
chmod +x flutter/bin/*
echo "/home/brandon/flexify/flutter/bin" >> $GITHUB_PATH
export PUB_CACHE=$(pwd)/.pub-cache
flutter/bin/flutter config --no-analytics
flutter/bin/flutter pub get
- name: Decode Android keystore
working-directory: /home/brandon/flexify
run: |
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
- name: Build android
working-directory: /home/brandon/flexify
run: |
echo "storePassword=${{ secrets.ANDROID_STORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
echo "storeFile=keystore.jks" >> android/key.properties
flutter build apk --split-per-abi
flutter build apk
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/flexify.apk
flutter build appbundle
mkdir -p "${GITHUB_WORKSPACE}/build"
mv build/* "${GITHUB_WORKSPACE}/build"
- name: Upload Android artifacts
uses: actions/upload-artifact@v4
with:
name: android-builds
path: |
build/app/outputs/flutter-apk/app-*-release.apk
build/app/outputs/flutter-apk/flexify.apk
build/app/outputs/bundle/release/app-release.aab
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Flutter from submodule
run: |
git submodule update --init --recursive flutter
chmod +x flutter/bin/*
echo "${{ github.workspace }}/flutter/bin" >> $GITHUB_PATH
flutter/bin/flutter config --no-analytics
- name: Get Flutter dependencies
run: flutter pub get
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- name: Build Linux
run: flutter build linux
- name: Create Linux zip
run: |
cd build/linux/x64/release/bundle
zip -r flexify-linux.zip .
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: linux-builds
path: build/linux/x64/release/bundle/flexify-linux.zip
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Flutter from submodule
run: |
git submodule update --init --recursive flutter
chmod +x flutter/bin/*
echo "${{ github.workspace }}\flutter\bin" >> $env:GITHUB_PATH
flutter\bin\flutter config --no-analytics
- name: Get Flutter dependencies
run: flutter pub get
- name: Build Windows
run: flutter build windows
- name: Create Windows zip
run: |
Compress-Archive -Path ./build/windows/x64/runner/Release/* -DestinationPath ./flexify-windows.zip
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-builds
path: |
flexify-windows.zip
build-and-deploy-web:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Flutter from submodule
run: |
git submodule update --init --recursive flutter
chmod +x flutter/bin/*
echo "${{ github.workspace }}/flutter/bin" >> $GITHUB_PATH
flutter/bin/flutter config --no-analytics
- name: Get Flutter dependencies
run: flutter pub get
- name: Enable web support
run: flutter config --enable-web
- name: Build Flutter web
run: |
flutter build web --release --base-href /${{ github.event.repository.name }}/
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./build/web
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
create-github-release:
needs: [build-android, build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body_path: fastlane/metadata/en-AU/release_notes.txt
files: |
android-builds/flutter-apk/app-*-release.apk
android-builds/flutter-apk/flexify.apk
android-builds/bundle/release/app-release.aab
linux-builds/flexify-linux.zip
windows-builds/flexify-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-windows-store:
needs: [build-windows]
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }} # Checkout the tag
- name: Setup Flutter from submodule
run: |
git submodule update --init --recursive flutter
chmod +x flutter/bin/*
echo "${{ github.workspace }}\flutter\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
flutter\bin\flutter config --no-analytics
- name: Get Flutter dependencies
run: flutter pub get
- name: Build MSIX
run: flutter pub run msix:create
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Setup Microsoft Store CLI
uses: microsoft/setup-msstore-cli@v1
- name: Configure Microsoft Store CLI
run: |
msstore reconfigure --tenantId ${{ secrets.AZURE_TENANT_ID }} --clientId ${{ secrets.AZURE_CLIENT_ID }} --clientSecret ${{ secrets.CLIENT_SECRET }} --sellerId ${{ secrets.SELLER_ID }}
- name: Publish to Microsoft Store
run: |
msstore publish build/windows/x64/runner/Release/flexify.msix --inputDirectory build/windows/x64/runner/Release --appId ${{ secrets.PRODUCT_ID }}