From 5864f2b31c4469e78f5ece16eb65a6ddcc7aba35 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sat, 15 Apr 2023 21:01:43 +0200 Subject: [PATCH] Add first version of github actions for building flathub packages --- .github/workflows/flathub-release.yml | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/flathub-release.yml diff --git a/.github/workflows/flathub-release.yml b/.github/workflows/flathub-release.yml new file mode 100644 index 000000000..3b2b6a6ca --- /dev/null +++ b/.github/workflows/flathub-release.yml @@ -0,0 +1,61 @@ +name: Flathub release +on: + push: + +jobs: + run: + name: Make release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Checkout tools repo + uses: actions/checkout@v3 + with: + repository: wger-project/flathub + path: flathub + + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: 17.x + + - name: Setup Flutter + uses: subosito/flutter-action@v1 + with: + channel: 'stable' + flutter-version: '3.7.x' + + - name: Decrypt config files + run: | + cd ./fastlane/metadata/envfiles + chmod +x ./decrypt_secrets.sh + ./decrypt_secrets.sh + env: + DECRYPTKEY_PLAYSTORE: ${{ secrets.DECRYPTKEY_PLAYSTORE }} + DECRYPTKEY_PLAYSTORE_SIGNING_KEY: ${{ secrets.DECRYPTKEY_PLAYSTORE_SIGNING_KEY }} + DECRYPTKEY_PROPERTIES: ${{ secrets.DECRYPTKEY_PROPERTIES }} + + - name: Flutter info + run: | + dart --version + flutter --version + + - name: Install Flutter dependencies + run: flutter pub get + + - name: Build application for linux + run: | + sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev + flutter build linux --release + cd flatpak + dart flatpak_generator.dart spec.json + env: + WGER_API_KEY: ${{ secrets.WGER_API_KEY }} + + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: Flatpak file + path: flatpak/wger-linux-x86_64.tar.gz \ No newline at end of file