Skip to content

Commit 53234f3

Browse files
committed
🔖 Release v0.2.5
Bump the app to 0.2.5 and fix the draft release lookup: a draft has no git tag yet, so releases/tags/{tag} 404s on it. List and match instead, and pin the release to the built commit with --target.
1 parent f74fe3d commit 53234f3

4 files changed

Lines changed: 23 additions & 5 deletions

File tree

‎.github/workflows/release-app.yml‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,32 @@ jobs:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868
run: |
6969
tag="app-v${{ needs.version.outputs.value }}"
70-
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
70+
71+
# A draft release has no git tag yet, so `releases/tags/{tag}` 404s on
72+
# it. Listing is the only way to find one by name; hence the --jq
73+
# match instead of a direct lookup.
74+
find_id() {
75+
gh api "repos/$GITHUB_REPOSITORY/releases" --paginate \
76+
--jq ".[] | select(.tag_name == \"$tag\") | .id" | head -n1
77+
}
78+
79+
id=$(find_id)
80+
if [ -z "$id" ]; then
81+
# --target pins the release to the exact commit being built, so the
82+
# tag is created there when the release is published.
7183
gh release create "$tag" \
7284
--repo "$GITHUB_REPOSITORY" \
85+
--target "$GITHUB_SHA" \
7386
--title "Stack v${{ needs.version.outputs.value }}" \
7487
--draft \
7588
--notes "Universal macOS build (Intel + Apple Silicon), Windows installers and Linux packages."
89+
id=$(find_id)
90+
fi
91+
92+
if [ -z "$id" ]; then
93+
echo "could not resolve a release id for $tag"
94+
exit 1
7695
fi
77-
id=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$tag" --jq .id)
7896
echo "id=$id" >> "$GITHUB_OUTPUT"
7997
8098
build:

‎packages/app/src-tauri/Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/app/src-tauri/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stack"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
description = "Local deployment tool"
55
authors = ["Codename"]
66
edition = "2021"

‎packages/app/src-tauri/tauri.conf.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Stack",
4-
"version": "0.2.4",
4+
"version": "0.2.5",
55
"identifier": "co.codename.stack",
66
"build": {
77
"beforeDevCommand": "npm run dev",

0 commit comments

Comments
 (0)