mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
The workflow assumes changelog and version information have been updated and the tag has not been created yet before running it. When the workflow finishes, it should take you to a release page with the uploaded binaries, where you can verify the final details and publish a tag officially. Also the following improvements were made: * Change CURRENT_PROJECT_VERSION to represent a monotonically increasing bundle version (starting at 2000) * Add MARKETING_VERSION to represent marketing version of Sparkle, comprised of SPARKLE_VERSION_MAJOR, SPARKLE_VERSION_MINOR, SPARKLE_VERSION_PATCH, and the new SPARKLE_VERSION_SUFFIX for pre-releases. * Verify code signing signatures of extracted SPM zip file in make release and CI * Generate changes to Sparkle podspec, just like the Package.swift file, based on current marketing version * Improve format of Info.plist version strings when appending git hash info, eliminating unnecessary whitespace * Simplify validating that XPC Service versions align with framework version * Handle lightweight tags in addition to annotated tags in release-move-tag.sh
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: "Create Draft Release"
|
|
|
|
env:
|
|
BUILDDIR: "build"
|
|
DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer"
|
|
|
|
on:
|
|
workflow_dispatch
|
|
|
|
concurrency:
|
|
group: publish-release-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
name: "Publish binaries for release"
|
|
runs-on: macos-11
|
|
|
|
steps:
|
|
- name: "Checkout sources"
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: "Extract version information from project"
|
|
run: |
|
|
MARKETING_VERSION=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep MARKETING_VERSION | grep -m 1 '^[[:space:]]*MARKETING_VERSION')
|
|
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> $GITHUB_ENV~
|
|
|
|
- name: "Determine if this is a pre-release version"
|
|
run: |
|
|
SPARKLE_VERSION_SUFFIX=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep SPARKLE_VERSION_SUFFIX | grep -m 1 '^[[:space:]]*SPARKLE_VERSION_SUFFIX')
|
|
if [[ ! -z "$SPARKLE_VERSION_SUFFIX" ]]; then
|
|
echo "PRERELEASE_VERSION=true" >> $GITHUB_ENV
|
|
else
|
|
echo "PRERELEASE_VERSION=false" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: "Create a temporary Git tag"
|
|
run: git tag "$MARKETING_VERSION"
|
|
|
|
- name: "Build release distribution"
|
|
run: make release
|
|
env:
|
|
GITHUB_ACTOR: ${{ github.actor }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
MARKETING_VERSION: ${{ env.MARKETING_VERSION }}
|
|
SPARKLE_VERSION_SUFFIX: ${{ env.SPARKLE_VERSION_SUFFIX }}
|
|
|
|
- name: "Push the updated Swift package description"
|
|
run: git push
|
|
|
|
- name: "Draft a release"
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
draft: true
|
|
prerelease: ${{ env.PRERELEASE_VERSION }}
|
|
name: "Sparkle ${{ env.MARKETING_VERSION }}"
|
|
tag_name: ${{ env.MARKETING_VERSION }}
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
build/Build/Products/Release/Sparkle-*.tar.xz
|
|
build/Build/Products/Release/Sparkle-for-Swift-Package-Manager.zip
|