Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ jobs:
restore-keys: swiftpm-${{ runner.os }}-${{ runner.arch }}-
- name: Resolve Swift dependencies
run: swift package resolve
- name: Test DMG packaging
run: bash Tests/Scripts/run-dmg-packaging-tests.sh
- name: Build debug configuration
run: swift build
- name: Build release configuration
Expand Down
61 changes: 60 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: false

permissions: {}

Expand All @@ -22,10 +22,69 @@ jobs:
contents: write
issues: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_sha: ${{ steps.release.outputs.sha }}
tag_name: ${{ steps.release.outputs.tag_name }}
version: ${{ steps.release.outputs.version }}
steps:
- name: Run release-please
id: release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

release-assets:
name: Release assets
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: macos-26
timeout-minutes: 30
permissions:
# gh release upload adds the DMG and checksum to the release.
contents: write
Comment thread
LMLiam marked this conversation as resolved.
steps:
- name: Check out release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ needs.release-please.outputs.release_sha }}
- name: Restore package build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
.build/package-dmg/swift/artifacts
.build/package-dmg/swift/checkouts
.build/package-dmg/swift/repositories
.build/package-dmg/DerivedData/SourcePackages
~/Library/Caches/org.swift.swiftpm
key: release-dmg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Package.resolved', 'Package.swift', 'project.yml') }}
restore-keys: release-dmg-${{ runner.os }}-${{ runner.arch }}-
- name: Install XcodeGen
env:
XCODEGEN_SHA256: 4d9e34b62172d645eed6457cac13fc222569974098ef4ee9c3368bedf0196806
XCODEGEN_VERSION: 2.46.0
run: |
archive="${RUNNER_TEMP}/xcodegen.zip"
curl --fail --location --silent --show-error \
--output "${archive}" \
"https://github.com/yonaskolb/XcodeGen/releases/download/${XCODEGEN_VERSION}/xcodegen.zip"
echo "${XCODEGEN_SHA256} ${archive}" | shasum -a 256 --check
unzip -q "${archive}" -d "${RUNNER_TEMP}"
echo "${RUNNER_TEMP}/xcodegen/bin" >> "${GITHUB_PATH}"
- name: Build release assets
env:
VERSION: ${{ needs.release-please.outputs.version }}
run: bash scripts/package-dmg.sh "${VERSION}" .build/releases
- name: Upload release assets
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ needs.release-please.outputs.tag_name }}
VERSION: ${{ needs.release-please.outputs.version }}
run: |
gh release upload "${TAG_NAME}" \
".build/releases/clamshellctl-v${VERSION}.dmg" \
".build/releases/clamshellctl-v${VERSION}.dmg.sha256" \
--clobber
4 changes: 2 additions & 2 deletions App/ClamshellApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSUIElement</key>
Expand Down
4 changes: 2 additions & 2 deletions App/ClamshellControl/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
Loading