ubuntu-flutter-community / musicpod

Music, radio, television and podcast player for Ubuntu, Windows, MacOs and maybe soon Android
GNU General Public License v3.0
439 stars 53 forks source link

GitHub Action for manual releases #379

Open Feichtmeier opened 10 months ago

Feichtmeier commented 10 months ago

@eboye hey I am taking another look and I would really like to have a githubaction to build the appimages for people who prefer manual downloads over store downloads

I am trying a github action but with the appimage-buidler action I miss some "app image receipe"

name: release linux appimage

on:
  push:
    branches:
      - main  

env:
  FLUTTER_VERSION: '3.16.x'

jobs:
  build_and_publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - 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 libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libmpv-dev
      - run: flutter pub get
      - uses: AppImageCrafters/build-appimage@master
        with:
          recipe: "./appimage-demo-qt5/AppImageBuilder.yml"
        env:
          UPDATE_INFO: gh-releases-zsync|AppImageCrafters|appimage-demo-qt5|latest|*x86_64.AppImage.zsync

Can your bash script be used to create such a receipe?

Originally posted by @Feichtmeier in https://github.com/ubuntu-flutter-community/musicpod/issues/257#issuecomment-1866325051

eboye commented 10 months ago

Sorry, I've posted with my corporate account :D

I can look into it

In the meantime, I think this could be the solution

https://github.com/AppImageCrafters/appimage-builder-flutter-example/blob/main/AppImageBuilder.yml#L4-L7

Those few lines are what the shell script should be implemented (changed).

Here's the PR

https://github.com/ubuntu-flutter-community/musicpod/pull/393

eboye commented 10 months ago

And btw, I think it should be hooked to releases which there is none in this repo.

Feichtmeier commented 8 months ago

Hey 👋 The action works but it after the ran the app image is gone Any idea how to connect this action to the releases?

eboye commented 8 months ago
name: AppImage Release

on:
  push:
    branches: [ main ]

env:
  FLUTTER_VERSION: '3.16.x'

jobs:
  build-appimage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - 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 libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libmpv-dev
      - run: flutter --disable-analytics
      - run: flutter pub get
      - run: flutter build linux --release
      - uses: AppImageCrafters/build-appimage@master
        with:
          recipe: "./AppImageBuilder.yml"
        env:
          UPLOAD_INFO: gh-releases-v2|ubuntu-flutter-community|musicpod|latest|*x86_64.AppImage
      - name: Create GitHub Release
        uses: appleboy/github-release@master
        with:
          tag_name: '${{ github.ref_name }}'
          token: ${{ secrets.GITHUB_TOKEN }}

I think these last 5 lines should do the trick. I think I made I typo for UPDATE_INFO in the first and UPLOAD_INFO should be correct.

You can try this, but I'll check it out when I get some spare time. This is out of head (and some other actions I've made).

Feichtmeier commented 7 months ago
appleboy/github-release@master

Thanks :)

appleboy/github-release@master doesnt exist any more but there are a bunch others we could try

elgohr/Github-Release-Action marvinpinto/action-automatic-releases softprops/action-gh-release ncipollo/release-action

Feichtmeier commented 7 months ago
appleboy/github-release@master

Thanks :)

appleboy/github-release@master doesnt exist any more but there are a bunch others we could try

elgohr/Github-Release-Action marvinpinto/action-automatic-releases softprops/action-gh-release ncipollo/release-action

This can be used for all releases in the future that are not snap

Feichtmeier commented 2 months ago

@eboye managed to create a good release cycle via bots now with release please and creating macos artifacts then

for the snap it always worked

but for the appimage I managed to attach it to the release action however it fails at some point and/or the appimag is not attached to the release maybe if you find time would be cool if you could take a look, in the end you are the only one here using the app image : D