Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
# Allow manual trigger
workflow_dispatch:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build:
name: Build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
artifact-name: devtoolbox-macos-release-${{ github.run_id }}
go-version-file: go.mod
runner-label: macos-26
github-release-prerelease: ${{ contains(github.ref_name, '-') }}
secrets: inherit
9 changes: 6 additions & 3 deletions docs/MACOS_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ This project ships macOS releases as a signed, notarized, and stapled
The first signed release is intentionally macOS-only. Linux and Windows release
artifacts are skipped until a later release pass.

Release tags use the normal stable project SemVer format, for example `v0.10.0`.
The packaging script embeds the tag version into the macOS app bundle as
`CFBundleShortVersionString` and `CFBundleVersion`.
Release tags use normal project SemVer. Stable releases use tags such as
`v0.10.0`; prereleases use tags such as `v0.10.0-rc.1`. The packaging script
embeds the stable base version into the macOS app bundle as
`CFBundleShortVersionString` and `CFBundleVersion`, so a prerelease tag like
`v0.10.0-rc.1` embeds `0.10.0` in the app bundle and marks the GitHub Release
as a prerelease.

## Required GitHub Secrets

Expand Down
15 changes: 12 additions & 3 deletions scripts/package-macos-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ set -euo pipefail
app_name="${APP_NAME:-DevToolbox}"
bin_dir="${BIN_DIR:-bin}"
app_version="${APP_VERSION:-}"
tag_version=""

if [[ -z "$app_version" && "${GITHUB_REF_TYPE:-}" == "tag" ]]; then
app_version="${GITHUB_REF_NAME#v}"
if [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then
tag_version="${GITHUB_REF_NAME#v}"
if [[ ! "$tag_version" =~ ^[0-9]+[.][0-9]+[.][0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then
echo "Release tag must be stable or prerelease SemVer with a leading v; got: ${GITHUB_REF_NAME:-}" >&2
exit 1
fi
fi

if [[ -z "$app_version" && -n "$tag_version" ]]; then
app_version="${tag_version%%-*}"
fi

if [[ -n "$app_version" && ! "$app_version" =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo "APP_VERSION must be stable SemVer without a leading v; got: $app_version" >&2
echo "APP_VERSION must be stable SemVer without a leading v because Apple bundle versions do not include prerelease labels; got: $app_version" >&2
exit 1
fi

Expand Down
Loading