Skip to content

Commit 2bb4541

Browse files
author
Adithya Ps
authored
Merge pull request #34 from psadi/feature/tip_builds
ci: add tip nightly builds
2 parents 7e01d2a + 4efdb9e commit 2bb4541

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
name: Build
1+
name: Build Ghostty AppImage
22
on:
3+
schedule:
4+
- cron: "0 0 * * *"
35
workflow_dispatch: {}
46
pull_request:
57
types: [opened, synchronize, reopened]
@@ -44,20 +46,24 @@ jobs:
4446
restore-keys: |
4547
${{ runner.os }}-${{ matrix.arch }}-ghostty-
4648
47-
- name: Setup Build Env
49+
- name: Setup Build Environment
4850
run: ./setup.sh
4951

50-
- name: Build Ghostty
51-
run: ./build.sh
52+
- name: Build Ghostty AppImage
53+
run: |
54+
if [ "${{ github.event_name }}" == "schedule" ]; then
55+
sed -i 's/GHOSTTY_VERSION="$(cat VERSION)"/GHOSTTY_VERSION="tip"/' build.sh
56+
fi
57+
./build.sh
5258
53-
- name: Upload Artifact
59+
- name: Upload AppImage Artifacts
5460
uses: actions/upload-artifact@v4
5561
with:
5662
name: ghostty-appimage-${{ matrix.arch }}
5763
retention-days: 7
5864
path: /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage*
5965

60-
- name: Upload binaries to release
66+
- name: Ghostty stable release
6167
if: ${{ github.event_name == 'release' }}
6268
uses: svenstaro/upload-release-action@v2
6369
with:
@@ -66,3 +72,15 @@ jobs:
6672
tag: ${{ github.ref }}
6773
overwrite: true
6874
file_glob: true
75+
76+
- name: Ghostty Tip ("Nightly") release
77+
uses: marvinpinto/action-automatic-releases@v1.2.1
78+
if: ${{ github.event_name == 'schedule' }}
79+
with:
80+
title: Ghostty Tip ("Nightly")
81+
automatic_release_tag: tip
82+
prerelease: true
83+
draft: false
84+
files: |
85+
/tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage*
86+
repo_token: ${{ secrets.GITHUB_TOKEN }}

build.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ mkdir -p -- "${TMP_DIR}" "${APP_DIR}/usr" "${APP_DIR}/usr/lib" "${APP_DIR}/usr/s
2020

2121
cd "${TMP_DIR}"
2222

23-
wget -q "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
24-
wget -q "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
23+
if [ $GHOSTTY_VERSION == "tip" ]; then
24+
BUILD_DIR="ghostty-source"
25+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O ghostty-${GHOSTTY_VERSION}.tar.gz
26+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
27+
else
28+
BUILD_DIR="ghostty-${GHOSTTY_VERSION}"
29+
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
30+
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
31+
fi
2532

2633
minisign -V -m "ghostty-${GHOSTTY_VERSION}.tar.gz" -P "${PUB_KEY}" -s "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
2734

@@ -31,7 +38,7 @@ tar -xzmf "ghostty-${GHOSTTY_VERSION}.tar.gz"
3138

3239
rm "ghostty-${GHOSTTY_VERSION}.tar.gz"
3340

34-
cd "${TMP_DIR}/ghostty-${GHOSTTY_VERSION}"
41+
cd "${TMP_DIR}/${BUILD_DIR}"
3542

3643
sed -i 's/linkSystemLibrary2("bzip2", dynamic_link_opts)/linkSystemLibrary2("bz2", dynamic_link_opts)/' src/build/SharedDeps.zig
3744

@@ -47,6 +54,8 @@ zig build \
4754
-Dcpu=baseline \
4855
-Dpie=true \
4956
-Demit-docs \
57+
-Dgtk-wayland=true \
58+
-Dgtk-x11=true \
5059
-Dversion-string="${GHOSTTY_VERSION}"
5160
# --system /tmp/offline-cache/p \
5261

0 commit comments

Comments
 (0)