From 1de16e1ea20204b6df680a6524aa10b25cf58056 Mon Sep 17 00:00:00 2001 From: Feichtmeier Date: Sat, 9 Nov 2024 19:15:26 +0100 Subject: [PATCH] chore: re-enable snap CI, but only on workflow_dispatch ... .. for when snapcraft has a problem --- .github/workflows/release.yml | 28 ++-------------------------- .github/workflows/snap.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/snap.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efb5e82a3..b9a565dc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,34 +84,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release upload ${{ steps.release.outputs.tag_name }} /Users/runner/work/musicpod/musicpod/build/macos/Build/Products/Release/musicpod.dmg - # Disabled until linux arm runners are available - # release_linux_edge: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: 5 - # - uses: subosito/flutter-action@v2 - # with: - # channel: 'stable' - # flutter-version: ${{env.FLUTTER_VERSION}} - # - run: sudo apt update - # - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libmpv-dev - # - run: flutter pub get - - # - uses: snapcore/action-build@v1 - # id: build - # - uses: snapcore/action-publish@v1 - # if: steps.build.outcome == 'success' - # env: - # SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} - # with: - # snap: ${{ steps.build.outputs.snap }} - # release: edge + # Disabled because it does not work + # AppImage # - run: flutter clean - # remove this when snap build is back, since this is included in the snapcraft musicpod->override-build phase # - run: flutter build linux --release -v - # Disabled because it does not work # - uses: AppImageCrafters/build-appimage@master # with: # recipe: "./appimage/AppImageBuilder.yml" diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml new file mode 100644 index 000000000..7ef6fe9ce --- /dev/null +++ b/.github/workflows/snap.yml @@ -0,0 +1,34 @@ +name: Create Snap Package + +on: +# push: +# branches: +# - main + workflow_dispatch: + +env: + FLUTTER_VERSION: '3.24.3' + +jobs: + build_and_release_linux_snap_edge_amd64: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 5 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version: ${{env.FLUTTER_VERSION}} + - run: sudo apt update + - run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip libunwind-dev libmpv-dev + - run: flutter pub get + - uses: snapcore/action-build@v1 + id: build + - uses: snapcore/action-publish@v1 + if: steps.build.outcome == 'success' + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} + with: + snap: ${{ steps.build.outputs.snap }} + release: edge