From edd52455d34635b9f653f1a80dfa58638da21ec0 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sun, 29 Dec 2024 23:55:53 +0100 Subject: [PATCH 1/8] init --- .github/workflows/build_Flatpak.yaml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build_Flatpak.yaml diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml new file mode 100644 index 000000000..49fe835b0 --- /dev/null +++ b/.github/workflows/build_Flatpak.yaml @@ -0,0 +1,38 @@ +on: + push: +# branches: [main] + pull_request: +name: CI +jobs: + flatpak: + name: "Flatpak" + runs-on: ubuntu-24.04 + container: + image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08 + options: --privileged + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install rustup + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + + - name: Run rustup + run: | + rustup toolchain -y install stable +# apt-get update +# apt-get install -y flatpak-builder + + - name: Clone Flatpak repo + run: | + git clone --recurse-submodules https://github.com/C0rn3j/com.github.taiko2k.tauonmb.git tauon-flatpak + cd tauon-flatpak; git checkout flatfix + + # https://github.com/marketplace/actions/flatpak-builder + - name: Build Flatpak + uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + with: + bundle: tauonmb.flatpak + manifest-path: tauon-flatpak/com.github.taiko2k.tauonmb.json + cache-key: flatpak-builder-${{ github.sha }} From 9a9c5fe7e3c717500bdf2092eaa7e85bc7d3d2c3 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Fri, 3 Jan 2025 22:22:33 +0100 Subject: [PATCH 2/8] Try adding cargo PATH to github env --- .github/workflows/build_Flatpak.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 49fe835b0..79bf9fb9e 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -17,6 +17,7 @@ jobs: - name: Install rustup run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "export PATH=$HOME/.cargo/bin:\$PATH" >> $GITHUB_ENV - name: Run rustup run: | From 5286caaacdad8c4a15ec95672196e544bc640744 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Fri, 3 Jan 2025 22:25:17 +0100 Subject: [PATCH 3/8] Fix running rustup --- .github/workflows/build_Flatpak.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 79bf9fb9e..3c30808fd 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -2,7 +2,7 @@ on: push: # branches: [main] pull_request: -name: CI +name: Build Flatpak app jobs: flatpak: name: "Flatpak" @@ -17,10 +17,10 @@ jobs: - name: Install rustup run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - echo "export PATH=$HOME/.cargo/bin:\$PATH" >> $GITHUB_ENV - name: Run rustup run: | + . "$HOME/.cargo/env" rustup toolchain -y install stable # apt-get update # apt-get install -y flatpak-builder From f3a821bb43d2bf0d6673d2e7f87f175a19bd9907 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Fri, 3 Jan 2025 22:27:13 +0100 Subject: [PATCH 4/8] Smol fixup --- .github/workflows/build_Flatpak.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 3c30808fd..45ca30cef 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -21,7 +21,7 @@ jobs: - name: Run rustup run: | . "$HOME/.cargo/env" - rustup toolchain -y install stable + rustup toolchain install stable # apt-get update # apt-get install -y flatpak-builder @@ -37,3 +37,21 @@ jobs: bundle: tauonmb.flatpak manifest-path: tauon-flatpak/com.github.taiko2k.tauonmb.json cache-key: flatpak-builder-${{ github.sha }} + + - name: "[DEBUG] List all files" + run: find . + + - name: Create 7z + run: | + mkdir -p dist/zip + APP_NAME="TauonMusicBox" + APP_PATH="dist/${APP_NAME}" + ZIP_PATH="dist/zip/${APP_NAME}.7z" + + zip -r "${ZIP_PATH}" "${APP_PATH}" + + - name: Upload 7z artifact + uses: actions/upload-artifact@v4 + with: + name: TauonMusicBox-flatpak + path: TauonMusicBox.7z From d961feae497324e8e5e52522d29f3107a0b54ec3 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Fri, 3 Jan 2025 23:49:58 +0100 Subject: [PATCH 5/8] Fix to different branch --- .github/workflows/build_Flatpak.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 45ca30cef..ea61fb3ca 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -28,7 +28,7 @@ jobs: - name: Clone Flatpak repo run: | git clone --recurse-submodules https://github.com/C0rn3j/com.github.taiko2k.tauonmb.git tauon-flatpak - cd tauon-flatpak; git checkout flatfix + cd tauon-flatpak; git checkout tekoreless # https://github.com/marketplace/actions/flatpak-builder - name: Build Flatpak From 9aadb7322392ab710549552285ad2e0420b04383 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 4 Jan 2025 00:30:37 +0100 Subject: [PATCH 6/8] Clean up the CI job --- .github/workflows/build_Flatpak.yaml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index ea61fb3ca..456d384ad 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -22,14 +22,15 @@ jobs: run: | . "$HOME/.cargo/env" rustup toolchain install stable -# apt-get update -# apt-get install -y flatpak-builder - name: Clone Flatpak repo run: | git clone --recurse-submodules https://github.com/C0rn3j/com.github.taiko2k.tauonmb.git tauon-flatpak cd tauon-flatpak; git checkout tekoreless + - name: "[DEBUG] List all files" + run: find . + # https://github.com/marketplace/actions/flatpak-builder - name: Build Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6 @@ -37,21 +38,3 @@ jobs: bundle: tauonmb.flatpak manifest-path: tauon-flatpak/com.github.taiko2k.tauonmb.json cache-key: flatpak-builder-${{ github.sha }} - - - name: "[DEBUG] List all files" - run: find . - - - name: Create 7z - run: | - mkdir -p dist/zip - APP_NAME="TauonMusicBox" - APP_PATH="dist/${APP_NAME}" - ZIP_PATH="dist/zip/${APP_NAME}.7z" - - zip -r "${ZIP_PATH}" "${APP_PATH}" - - - name: Upload 7z artifact - uses: actions/upload-artifact@v4 - with: - name: TauonMusicBox-flatpak - path: TauonMusicBox.7z From 2b2aa61f4b9784ab34e87e362d0cdff87833c6b4 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 4 Jan 2025 00:31:50 +0100 Subject: [PATCH 7/8] Update flatpak builder action --- .github/workflows/build_Flatpak.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 456d384ad..6f9edf41d 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -33,7 +33,7 @@ jobs: # https://github.com/marketplace/actions/flatpak-builder - name: Build Flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + uses: flatpak/flatpak-github-actions@v6.3 with: bundle: tauonmb.flatpak manifest-path: tauon-flatpak/com.github.taiko2k.tauonmb.json From e7ef52ba97941a4f5e5f8a6ca920ff7086b0e63e Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 4 Jan 2025 00:53:04 +0100 Subject: [PATCH 8/8] try 6.3 this way --- .github/workflows/build_Flatpak.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_Flatpak.yaml b/.github/workflows/build_Flatpak.yaml index 6f9edf41d..a51c115df 100644 --- a/.github/workflows/build_Flatpak.yaml +++ b/.github/workflows/build_Flatpak.yaml @@ -33,7 +33,7 @@ jobs: # https://github.com/marketplace/actions/flatpak-builder - name: Build Flatpak - uses: flatpak/flatpak-github-actions@v6.3 + uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3 with: bundle: tauonmb.flatpak manifest-path: tauon-flatpak/com.github.taiko2k.tauonmb.json