Skip to content

Release

Release #1

Workflow file for this run

name: Release
# Builds an unsigned .dmg and attaches it to the GitHub Release when a
# version tag (e.g. v0.1.0) is pushed. Also runnable manually.
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
build-dmg:
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain versions
run: |
xcodebuild -version
swift --version
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate Xcode project
run: xcodegen generate
- name: Build Shortcast (Release, unsigned)
run: |
xcodebuild \
-project Shortcast.xcodeproj \
-scheme Shortcast \
-configuration Release \
-derivedDataPath build \
-skipMacroValidation \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO \
clean build
- name: Package .dmg
run: |
set -euo pipefail
APP="build/Build/Products/Release/Shortcast.app"
test -d "$APP"
STAGE="dist/dmg"
mkdir -p "$STAGE"
cp -R "$APP" "$STAGE/"
ln -s /Applications "$STAGE/Applications"
hdiutil create \
-volname "Shortcast" \
-srcfolder "$STAGE" \
-ov -format UDZO \
"dist/Shortcast.dmg"
- name: Upload .dmg artifact
uses: actions/upload-artifact@v4
with:
name: Shortcast-dmg
path: dist/Shortcast.dmg
- name: Attach .dmg to the Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/Shortcast.dmg
fail_on_unmatched_files: true