Anylinux-AppImage #203
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: Anylinux-AppImage | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| schedule: | |
| - cron: "0 7 1/7 * *" # We default to rebuilding every 21 days, change this to your liking | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| name: "${{ matrix.name }} (${{ matrix.arch }})" | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| matrix: | |
| include: | |
| - runs-on: ubuntu-latest | |
| name: Build AppImage | |
| arch: x86_64 | |
| # comment out these 3 lines if aarch64 is not wanted | |
| - runs-on: ubuntu-24.04-arm | |
| name: Build AppImage | |
| arch: aarch64 | |
| container: ghcr.io/pkgforge-dev/archlinux:latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Preparing Container | |
| uses: pkgforge-dev/anylinux-setup-action@8872fabe63f9a00b35e25b2f46da62a05afc9a7d # v1 | |
| - name: Install Dependencies | |
| run: /bin/sh ./get-dependencies.sh | |
| - name: Make AppImage | |
| run: /bin/sh ./make-appimage.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: AppImage-${{ matrix.arch }} | |
| path: dist | |
| release: | |
| if: ${{ github.ref_name == 'main' }} | |
| needs: [build] | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| pattern: AppImage-* | |
| merge-multiple: true | |
| - name: Read version and Get date | |
| run: | | |
| echo "VERSION=$(awk -F'=' '/X-AppImage-Version/{print $2; exit}' ./appinfo)" >> "${GITHUB_ENV}" | |
| echo "DATE=$(date +'%Y-%m-%d_%s')" >> "${GITHUB_ENV}" | |
| - name: Release Artifacts | |
| uses: softprops/[email protected] | |
| with: | |
| name: "mpv: ${{ env.VERSION }}" | |
| tag_name: "${{ env.VERSION }}@${{ env.DATE }}" | |
| prerelease: false | |
| draft: false | |
| generate_release_notes: false | |
| make_latest: true | |
| files: | | |
| *.AppImage* | |
| *.AppBundle* | |
| - uses: actions/checkout@v4 | |
| - name: Update LATEST_VERSION | |
| run: | | |
| echo "${{ env.VERSION }}" > ./LATEST_VERSION | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add ./LATEST_VERSION | |
| git commit --allow-empty -m 'bump `LATEST_VERSION` [skip ci]' | |
| git push |