Build Citron (Nightly) #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Citron (Nightly) | |
| concurrency: | |
| group: build-nightly-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| name: "${{ matrix.name }} (${{ matrix.arch }})" | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| matrix: | |
| include: | |
| - runs-on: ubuntu-latest | |
| optimized: false | |
| name: "Citron build (Normal)" | |
| arch: x86_64 | |
| - runs-on: ubuntu-latest | |
| optimized: true | |
| name: "Citron Build (Optimized)" | |
| arch: x86_64 | |
| - runs-on: ubuntu-24.04-arm | |
| name: "Citron Build (Normal)" | |
| optimized: false | |
| arch: aarch64 | |
| container: ghcr.io/pkgforge-dev/archlinux:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| if: always() | |
| run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh | |
| - name: Compile Citron (Normal) | |
| if: ${{ matrix.optimized == false }} | |
| run: | | |
| chmod +x ./citron-appimage.sh && DEVEL=true ./citron-appimage.sh | |
| mkdir -p dist | |
| mv *.AppImage* dist/ | |
| - name: Compile Citron (Optimized) | |
| if: ${{ matrix.optimized == true }} | |
| run: | | |
| rm -rf ./AppDir || true | |
| sudo pacman -R --noconfirm citron || true | |
| chmod +x ./citron-appimage.sh && DEVEL=true ./citron-appimage.sh v3 | |
| mkdir -p dist | |
| mv *.AppImage* dist/ | |
| - name: Upload artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: citron-${{ matrix.optimized && 'optimized' || 'normal' }}-appimage-${{ matrix.arch }} | |
| path: "dist" | |
| - name: Check version file | |
| if: ${{ matrix.optimized == false }} | |
| run: | | |
| cat ~/version | |
| echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}" | |
| - name: Upload version file | |
| uses: actions/[email protected] | |
| with: | |
| name: version | |
| path: ~/version | |
| overwrite: true | |
| release: | |
| name: "release" | |
| needs: [build] | |
| permissions: | |
| actions: read | |
| security-events: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| name: citron-optimized-appimage-x86_64 | |
| - uses: actions/[email protected] | |
| with: | |
| name: citron-normal-appimage-x86_64 | |
| - uses: actions/[email protected] | |
| with: | |
| name: citron-normal-appimage-aarch64 | |
| - uses: actions/[email protected] | |
| with: | |
| name: version | |
| - name: Read version | |
| run: | | |
| export VERSION="$(cat version)" | |
| echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}" | |
| - name: Del Previous Release | |
| run: | | |
| gh release delete "nightly" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y | |
| sleep 5 | |
| env: | |
| GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| continue-on-error: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "Continuous Build (Nightly Version: ${{ env.APP_VERSION }})" | |
| tag_name: "nightly" | |
| prerelease: true | |
| draft: false | |
| generate_release_notes: false | |
| make_latest: false | |
| files: | | |
| *.AppImage* |