Skip to content

Commit 5a6959d

Browse files
committed
Improve workflow
1 parent 5864f2b commit 5a6959d

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

.github/workflows/flathub-release.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@ name: Flathub release
22
on:
33
push:
44

5-
jobs:
5+
defaults:
66
run:
7-
name: Make release
7+
working-directory: wger
8+
9+
jobs:
10+
setup:
11+
name: Setup
812
runs-on: ubuntu-latest
913
steps:
1014
- name: Checkout code
1115
uses: actions/checkout@v2
16+
with:
17+
path: wger
1218

13-
- name: Checkout tools repo
19+
- name: Checkout flathub repo
1420
uses: actions/checkout@v3
1521
with:
16-
repository: wger-project/flathub
22+
repository: wger-project/test
1723
path: flathub
18-
1924
- name: Setup Java
2025
uses: actions/setup-java@v1
2126
with:
@@ -47,15 +52,40 @@ jobs:
4752

4853
- name: Build application for linux
4954
run: |
50-
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
51-
flutter build linux --release
55+
# sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
56+
# flutter build linux --release
5257
cd flatpak
53-
dart flatpak_generator.dart spec.json
58+
# dart flatpak_generator.dart spec.json
59+
60+
cp spec.json ../../flathub
5461
env:
5562
WGER_API_KEY: ${{ secrets.WGER_API_KEY }}
5663

57-
- name: Archive code coverage results
64+
- name: Push to flathub repository
65+
uses: cpina/github-action-push-to-another-repository@main
66+
env:
67+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
68+
with:
69+
source-directory: 'flathub'
70+
destination-github-username: 'wger-project'
71+
destination-repository-name: 'test'
72+
user-email: [email protected]
73+
target-branch: master
74+
commit-message: Update spec.json
75+
76+
- name: Upload generated flatpak archive
5877
uses: actions/upload-artifact@v3
5978
with:
6079
name: Flatpak file
61-
path: flatpak/wger-linux-x86_64.tar.gz
80+
path: wger/flatpak/wger-linux-x86_64.tar.gz
81+
82+
#- name: Build AAB
83+
# run: flutter build appbundle --release
84+
# env:
85+
# WGER_API_KEY: ${{ secrets.WGER_API_KEY }}
86+
87+
#- name: Upload generated aab archive
88+
# uses: actions/upload-artifact@v3
89+
# with:
90+
# name: AAB file
91+
# path: wger/build/app/outputs/bundle/release/app-release.aab

0 commit comments

Comments
 (0)