|
| 1 | +name: Appimage |
| 2 | +concurrency: |
| 3 | + group: build-${{ github.ref }} |
| 4 | + cancel-in-progress: true |
| 5 | + |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "0 16 1/7 * *" |
| 9 | + workflow_dispatch: |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + name: "${{ matrix.name }} (${{ matrix.arch }})" |
| 13 | + runs-on: ${{ matrix.runs-on }} |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - runs-on: ubuntu-latest |
| 18 | + name: "Build AppImage" |
| 19 | + arch: x86_64 |
| 20 | + - runs-on: ubuntu-24.04-arm |
| 21 | + name: "Build AppImage" |
| 22 | + arch: aarch64 |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Make AppImage |
| 27 | + run: | |
| 28 | + sudo apt install wget tar |
| 29 | + chmod +x ./*-appimage.sh |
| 30 | + ./*-appimage.sh |
| 31 | + mkdir dist |
| 32 | + mv *.AppImage* dist/ |
| 33 | +
|
| 34 | + - name: Check version file |
| 35 | + run: | |
| 36 | + cat ~/version |
| 37 | + echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}" |
| 38 | +
|
| 39 | + - name: Upload artifact |
| 40 | + |
| 41 | + with: |
| 42 | + name: AppImage-${{ matrix.arch }} |
| 43 | + path: 'dist' |
| 44 | + |
| 45 | + - name: Upload version file |
| 46 | + |
| 47 | + with: |
| 48 | + name: version |
| 49 | + path: ~/version |
| 50 | + overwrite: true |
| 51 | + |
| 52 | + release: |
| 53 | + needs: [build] |
| 54 | + permissions: write-all |
| 55 | + runs-on: ubuntu-latest |
| 56 | + |
| 57 | + steps: |
| 58 | + |
| 59 | + with: |
| 60 | + name: AppImage-x86_64 |
| 61 | + |
| 62 | + |
| 63 | + with: |
| 64 | + name: AppImage-aarch64 |
| 65 | + |
| 66 | + |
| 67 | + with: |
| 68 | + name: version |
| 69 | + |
| 70 | + - name: Read version |
| 71 | + run: | |
| 72 | + cat version |
| 73 | + export VERSION="$(cat version)" |
| 74 | + echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}" |
| 75 | +
|
| 76 | + #Version Release |
| 77 | + - name: Del Previous Release |
| 78 | + run: | |
| 79 | + gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y |
| 80 | + sleep 5 |
| 81 | + env: |
| 82 | + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
| 83 | + continue-on-error: true |
| 84 | + - name: Continuous Releaser |
| 85 | + uses: softprops/action-gh-release@v2 |
| 86 | + with: |
| 87 | + name: "fastfetch AppImage ${{ env.APP_VERSION }}" |
| 88 | + tag_name: "${{ env.APP_VERSION }}" |
| 89 | + prerelease: false |
| 90 | + draft: false |
| 91 | + generate_release_notes: false |
| 92 | + make_latest: true |
| 93 | + files: | |
| 94 | + *.AppImage* |
| 95 | + continue-on-error: false |
| 96 | + |
| 97 | + #Snapshot Release |
| 98 | + - name: Get Date |
| 99 | + run: | |
| 100 | + SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')" |
| 101 | + echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}" |
| 102 | + continue-on-error: false |
| 103 | + - name: Snapshot Releaser |
| 104 | + uses: softprops/action-gh-release@v2 |
| 105 | + with: |
| 106 | + name: "Snapshot ${{ env.APP_VERSION }}" |
| 107 | + tag_name: "${{ env.SNAPSHOT_TAG }}" |
| 108 | + prerelease: false |
| 109 | + draft: false |
| 110 | + generate_release_notes: false |
| 111 | + make_latest: false |
| 112 | + files: | |
| 113 | + *.AppImage* |
| 114 | + continue-on-error: false |
0 commit comments