|
| 1 | +name: Appimage |
| 2 | +concurrency: |
| 3 | + group: build-${{ github.ref }} |
| 4 | + cancel-in-progress: true |
| 5 | + |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "0 7 1/21 * *" |
| 9 | + workflow_dispatch: {} |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + name: "${{ matrix.name }} (${{ matrix.arch }})" |
| 14 | + runs-on: ${{ matrix.runs-on }} |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + include: |
| 18 | + - runs-on: ubuntu-latest |
| 19 | + name: Build AppImage |
| 20 | + arch: x86_64 |
| 21 | + - runs-on: ubuntu-24.04-arm |
| 22 | + name: Build AppImage |
| 23 | + arch: aarch64 |
| 24 | + container: ghcr.io/pkgforge-dev/archlinux:latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + |
| 28 | + - name: Get dependencies |
| 29 | + run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh |
| 30 | + |
| 31 | + - name: Make AppImage |
| 32 | + run: chmod +x ./*-appimage.sh && ./*-appimage.sh |
| 33 | + |
| 34 | + - name: Upload artifact |
| 35 | + |
| 36 | + with: |
| 37 | + name: AppImage-${{ matrix.arch }} |
| 38 | + path: dist |
| 39 | + |
| 40 | + release: |
| 41 | + if: ${{ github.ref_name == 'main' }} |
| 42 | + needs: [build] |
| 43 | + permissions: write-all |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + |
| 47 | + with: |
| 48 | + pattern: AppImage-* |
| 49 | + merge-multiple: true |
| 50 | + |
| 51 | + - name: Read version and Get date |
| 52 | + run: | |
| 53 | + cat ./version |
| 54 | + echo "VERSION=$(cat ./version)" >> "${GITHUB_ENV}" |
| 55 | + echo "DATE=$(date +'%Y-%m-%d_%s')" >> "${GITHUB_ENV}" |
| 56 | +
|
| 57 | + - name: Release Artifacts |
| 58 | + |
| 59 | + with: |
| 60 | + name: "Clementine: ${{ env.VERSION }}" |
| 61 | + tag_name: "${{ env.VERSION }}@${{ env.DATE }}" |
| 62 | + prerelease: false |
| 63 | + draft: false |
| 64 | + generate_release_notes: false |
| 65 | + make_latest: true |
| 66 | + files: | |
| 67 | + *.AppImage* |
| 68 | + *.AppBundle* |
| 69 | +
|
| 70 | + - uses: actions/checkout@v4 |
| 71 | + - name: Update LATEST_VERSION |
| 72 | + run: | |
| 73 | + echo "${{ env.VERSION }}" > ./LATEST_VERSION |
| 74 | + git config user.name "github-actions[bot]" |
| 75 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 76 | + git add ./LATEST_VERSION |
| 77 | + git commit --allow-empty -m 'bump `LATEST_VERSION` [skip ci]' |
| 78 | + git push |
0 commit comments