Skip to content

Commit 5b82099

Browse files
author
psadi
committed
ci: delete old release assets for nightly builds
1 parent 2f55e52 commit 5b82099

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ jobs:
5555
- name: Setup build environment
5656
run: |
5757
if [ "${{ github.event_name }}" == "schedule" ]; then
58-
ZIG_VERSION=0.14.0
58+
export ZIG_VERSION=0.14.0
5959
else
60-
ZIG_VERSION=0.13.0
60+
export ZIG_VERSION=0.13.0
6161
fi
6262
63-
sed -i "s/#ZIG_VERSION/${ZIG_VERSION}/g" setup.sh
64-
./setup.sh
63+
ZIG_VERSION=$ZIG_VERSION ./setup.sh
6564
6665
- name: Build Ghostty AppImage
6766
run: |
@@ -89,7 +88,18 @@ jobs:
8988
- build_appimage
9089
steps:
9190
- uses: actions/checkout@v4 # zizmor: ignore[artipacked]
92-
- name: Tip Tag
91+
92+
- name: Clean-up Old Release Assets
93+
run: |
94+
gh release view tip --json assets --jq '.assets[].name' | while read -r asset; do
95+
if [ -n "$asset" ]; then
96+
gh release delete-asset tip "${asset}" -y
97+
fi
98+
done
99+
env:
100+
GH_TOKEN: ${{ github.token }}
101+
102+
- name: Create 'tip' tag
93103
run: |
94104
git config user.name "github-actions[bot]"
95105
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pacman -Syuq --needed --noconfirm --noprogressbar ${buildDeps} ${ghosttyDeps}
1717

1818
export ARCH="$(uname -m)"
1919

20-
ZIG_VERSION="#ZIG_VERSION"
20+
ZIG_VERSION="${ZIG_VERSION:-0.13.0}"
2121
PANDOC_VERSION="$(get_latest_gh_release 'jgm/pandoc')"
2222
MINISIGN_VERSION="$(get_latest_gh_release 'jedisct1/minisign')"
2323
SHARUN_VERSION="$(get_latest_gh_release 'VHSgunzo/sharun')"

0 commit comments

Comments
 (0)