|
| 1 | +name: Appimage (Nightly) |
| 2 | +concurrency: |
| 3 | + group: build-${{ github.ref }} |
| 4 | + cancel-in-progress: true |
| 5 | + |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "0 7 1/3 * *" |
| 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 | + optimized: false |
| 20 | + name: "Azahar build (Normal)" |
| 21 | + arch: x86_64 |
| 22 | + - runs-on: ubuntu-latest |
| 23 | + optimized: true |
| 24 | + name: "Azahar Build (Optimized)" |
| 25 | + arch: x86_64 |
| 26 | + - runs-on: ubuntu-24.04-arm |
| 27 | + name: "Azahar build" |
| 28 | + optimized: false |
| 29 | + arch: aarch64 |
| 30 | + container: ghcr.io/pkgforge-dev/archlinux:latest |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + persist-credentials: false |
| 35 | + |
| 36 | + - name: Install dependencies |
| 37 | + if: always() |
| 38 | + run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh |
| 39 | + |
| 40 | + - name: Compile Azahar (Normal) |
| 41 | + if: ${{ matrix.optimized == false }} |
| 42 | + run: | |
| 43 | + export DEVEL=true |
| 44 | + chmod +x ./azahar-appimage.sh && ./azahar-appimage.sh |
| 45 | + mkdir -p dist |
| 46 | + mv *.AppImage* dist/ |
| 47 | +
|
| 48 | + - name: Compile Azahar (Optimized) |
| 49 | + if: ${{ matrix.optimized == true }} |
| 50 | + run: | |
| 51 | + export DEVEL=true |
| 52 | + chmod +x ./azahar-appimage.sh && ./azahar-appimage.sh v3 |
| 53 | + mkdir -p dist |
| 54 | + mv *.AppImage* dist/ |
| 55 | +
|
| 56 | + - name: Upload artifact |
| 57 | + |
| 58 | + with: |
| 59 | + name: azahar-${{ matrix.optimized && 'optimized' || 'normal' }}-appimage-${{ matrix.arch }} |
| 60 | + path: "dist" |
| 61 | + |
| 62 | + - name: Check version file |
| 63 | + if: ${{ matrix.optimized == false }} |
| 64 | + run: | |
| 65 | + cat ~/version |
| 66 | + echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}" |
| 67 | +
|
| 68 | + - name: Upload version file |
| 69 | + |
| 70 | + with: |
| 71 | + name: version |
| 72 | + path: ~/version |
| 73 | + overwrite: true |
| 74 | + |
| 75 | + release: |
| 76 | + name: "release" |
| 77 | + needs: [build] |
| 78 | + permissions: |
| 79 | + actions: read |
| 80 | + security-events: write |
| 81 | + contents: write |
| 82 | + runs-on: ubuntu-latest |
| 83 | + steps: |
| 84 | + |
| 85 | + with: |
| 86 | + name: azahar-optimized-appimage-x86_64 |
| 87 | + |
| 88 | + |
| 89 | + with: |
| 90 | + name: azahar-normal-appimage-x86_64 |
| 91 | + |
| 92 | + |
| 93 | + with: |
| 94 | + name: azahar-normal-appimage-aarch64 |
| 95 | + |
| 96 | + |
| 97 | + with: |
| 98 | + name: version |
| 99 | + |
| 100 | + - name: Read version |
| 101 | + run: | |
| 102 | + export VERSION="$(cat version)" |
| 103 | + export SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')" |
| 104 | + echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}" |
| 105 | + echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}" |
| 106 | +
|
| 107 | + - name: Del Previous Release |
| 108 | + run: | |
| 109 | + gh release delete "nightly" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y |
| 110 | + sleep 5 |
| 111 | + env: |
| 112 | + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
| 113 | + continue-on-error: true |
| 114 | + |
| 115 | + - name: Continuous Releaser |
| 116 | + uses: softprops/action-gh-release@v2 |
| 117 | + with: |
| 118 | + name: "Azahar AppImage Nightly ${{ env.APP_VERSION }}" |
| 119 | + tag_name: "${{ env.APP_VERSION }}" |
| 120 | + prerelease: true |
| 121 | + draft: false |
| 122 | + generate_release_notes: false |
| 123 | + make_latest: true |
| 124 | + files: | |
| 125 | + *.AppImage* |
0 commit comments