Skip to content

v1.1.1 — Add GitHub Actions release workflow and DMG build script #1

v1.1.1 — Add GitHub Actions release workflow and DMG build script

v1.1.1 — Add GitHub Actions release workflow and DMG build script #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-and-release:
runs-on: macos-15
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Select Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.2"
- name: Show toolchain versions
run: |
xcodebuild -version
swift --version
- name: Build release DMG
run: ./scripts/build-release-dmg.sh
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG_NAME="${GITHUB_REF_NAME}"
DMG_PATH="$(find dist -maxdepth 1 -name '*.dmg' | head -n 1)"
if [[ -z "$DMG_PATH" ]]; then
echo "No DMG artifact found in dist/."
exit 1
fi
if gh release view "$TAG_NAME" >/dev/null 2>&1; then
gh release upload "$TAG_NAME" "$DMG_PATH" --clobber
else
gh release create "$TAG_NAME" "$DMG_PATH" \
--title "$TAG_NAME" \
--notes-file CHANGELOG.md
fi