name: AppImage Continuous on: push: branches: - '*' pull_request: branches: - '*' workflow_dispatch: env: BUILD_TYPE: RelWithDebInfo jobs: linux-appimage-continuous-build: name: Linux ${{ matrix.os.arch }} (Continuous build) runs-on: ${{ matrix.os.label }} strategy: matrix: os: # x86_64 (https://github.com/actions/runner-images/tree/main/images/ubuntu) - { arch: x86_64, label: ubuntu-24.04 } # ARM64 (https://github.com/actions/partner-runner-images) - { arch: aarch64, label: ubuntu-24.04-arm } container: ghcr.io/pkgforge-dev/archlinux:latest steps: - name: Set environment variables run: | echo "REPO_USERNAME=${GITHUB_REPOSITORY//\//|}" >> $GITHUB_ENV echo "Repository username is '${REPO_USERNAME}'" - name: Install prerequisites run: pacman -Syu --noconfirm sudo - uses: actions/checkout@v5 - name: Build libcpuid run: ./scripts/build_libcpuid.sh -t "$BUILD_TYPE" - name: Build CPU-X run: ./scripts/build_cpu_x.sh -s "$GITHUB_WORKSPACE" -t "$BUILD_TYPE" -i "$GITHUB_WORKSPACE/AppDir" - name: Create AppImage run: ./scripts/build_appimage.sh -s "$GITHUB_WORKSPACE" -a "$GITHUB_WORKSPACE/AppDir" -u "$REPO_USERNAME" - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: linux-${{ matrix.os.arch }} path: AppImage/CPU-X-* linux-appimage-continuous-release: name: Linux (Continuous release) needs: linux-appimage-continuous-build runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v5 - name: Download all artifacts uses: actions/download-artifact@v5 with: path: AppImage/ merge-multiple: true - name: Display structure of downloaded files run: ls -lhR AppImage/ - name: Delete previous continuous release run: gh release delete continuous --cleanup-tag env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create continuous release uses: ncipollo/release-action@v1 with: allowUpdates: true artifacts: "AppImage/CPU-X-*.AppImage*" body: | :heavy_check_mark:CPU-X AppImage built from latest commit ([${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})). See [known issues](https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/wiki/appimage). commit: ${{ github.sha }} draft: false name: Continuous build prerelease: true removeArtifacts: true replacesArtifacts: true skipIfReleaseExists: false tag: continuous token: "${{ secrets.GITHUB_TOKEN }}"