-
Notifications
You must be signed in to change notification settings - Fork 10
201 lines (183 loc) · 5.46 KB
/
ci.yaml
File metadata and controls
201 lines (183 loc) · 5.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: Build
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: {}
pull_request:
paths-ignore:
- "**/*.md"
- "**/VERSION"
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
/root/.cache/zig
key: ${{ runner.os }}-${{ matrix.arch }}-ghostty-${{ hashFiles('**/VERSION') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-ghostty-
- name: Setup build environment
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
export ZIG_VERSION=0.14.0
else
export ZIG_VERSION=0.13.0
fi
ZIG_VERSION=$ZIG_VERSION ./setup.sh
- name: Build Ghostty AppImage
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
echo "tip" > VERSION
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*
tag:
name: "👻 Tip Tag"
if: ${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
permissions:
actions: read
security-events: write
contents: write
runs-on: ubuntu-latest
needs:
- build_appimage
steps:
- uses: actions/checkout@v4 # zizmor: ignore[artipacked]
- name: Clean-up Old Release Assets
run: |
gh release view tip --json assets --jq '.assets[].name' | while read -r asset; do
if [ -n "$asset" ]; then
gh release delete-asset tip "${asset}" -y
fi
done
env:
GH_TOKEN: ${{ github.token }}
- name: Create 'tip' tag
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -fa tip -m "Latest Continuous Release" ${GITHUB_SHA}
git push --force origin tip
release_stable:
name: 👻 Release Ghostty AppImage (Stable)
needs:
- build_appimage
permissions:
actions: read
contents: write
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-aarch64
- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-x86_64
- name: Ghostty stable
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.AppImage*"
tag: ${{ github.ref }}
overwrite: true
file_glob: true
soar_nest_stable:
needs:
- release_stable
permissions:
attestations: write
contents: write
id-token: write
packages: write
uses: "pkgforge/soarpkgs/.github/workflows/matrix_builds.yaml@main"
with:
host: "ALL"
sbuild-url: "https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/packages/ghostty/appimage.pkgforge-dev.stable.yaml"
ghcr-url: "ghcr.io/${{ github.repository }}/stable"
pkg-family: "ghostty"
banner: true
debug: true
logs: true
rebuild: true
release_nightly:
name: 👻 Release Ghostty AppImage (Nightly)
if: ${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
needs:
- build_appimage
- tag
permissions:
actions: read
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-aarch64
- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-x86_64
- name: Ghostty Tip ("Nightly")
uses: softprops/action-gh-release@v2.2.2
with:
name: '👻 Ghostty Tip ("Nightly")'
prerelease: true
tag_name: tip
target_commitish: ${{ github.sha }}
files: |
*.AppImage*
soar_nest_nightly:
needs:
- release_nightly
permissions:
attestations: write
contents: write
id-token: write
packages: write
uses: "pkgforge/soarpkgs/.github/workflows/matrix_builds.yaml@main"
with:
host: "ALL"
sbuild-url: "https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/packages/ghostty/appimage.pkgforge-dev.nightly.yaml"
ghcr-url: "ghcr.io/${{ github.repository }}/nightly"
pkg-family: "ghostty-nightly"
banner: true
debug: true
logs: true
rebuild: true