ci: add tip nightly builds #184
Workflow file for this run
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 Ghostty AppImage | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: {} | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| release: | |
| types: [published] | |
| jobs: | |
| build_appimage: | |
| permissions: | |
| actions: read | |
| security-events: write | |
| contents: write | |
| name: Build Ghostty (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: aarch64 | |
| platform: linux/arm64 | |
| runs-on: ubuntu-24.04-arm | |
| - arch: x86_64 | |
| platform: linux/amd64 | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ghcr.io/pkgforge-dev/archlinux:latest | |
| steps: | |
| - name: Checkout ghostty-appimage | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Cache dependencies | |
| id: cache-ghostty | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| /var/cache/pacman | |
| /tmp/offline-cache | |
| /usr/local/bin | |
| /opt | |
| key: ${{ runner.os }}-${{ matrix.arch }}-ghostty-${{ hashFiles('**/setup.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.arch }}-ghostty- | |
| - name: Setup Build Environment | |
| run: ./setup.sh | |
| - name: Build Ghostty AppImage | |
| run: | | |
| if [ "${{ github.event_name }}" == "schedule" ]; then | |
| sed -i 's/GHOSTTY_VERSION="$(cat VERSION)"/GHOSTTY_VERSION="tip"/' build.sh | |
| fi | |
| ./build.sh | |
| - name: Upload AppImage Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ghostty-appimage-${{ matrix.arch }} | |
| retention-days: 7 | |
| path: /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage* | |
| - name: Ghostty stable release | |
| if: ${{ github.event_name == 'release' }} | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage* | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |
| - name: Ghostty Tip ("Nightly") release | |
| uses: marvinpinto/action-automatic-releases@v1.2.1 | |
| if: ${{ github.event_name == 'schedule' }} | |
| with: | |
| title: Ghostty Tip ("Nightly") | |
| automatic_release_tag: tip | |
| prerelease: true | |
| draft: false | |
| files: | | |
| /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage* | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} |