Allow quicklook to appear above extra pane #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: push | |
jobs: | |
build-and-release: | |
name: Build AlfredExtraPane and release | |
runs-on: macos-13 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Don't shallow-copy the repo. Need all the tags. | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_15.2.app | |
- name: Xcode version | |
run: /usr/bin/xcodebuild -version | |
- name: Get Previous Tag | |
run: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Get App Version | |
run: echo "APP_VERSION=$(xcodebuild -showBuildSettings | grep MARKETING_VERSION | cut -f2 -d = | tr -d '[:space:]')" >> $GITHUB_ENV | |
- name: Get commit messages since last release | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
run: | | |
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") | |
if [ -z "$LAST_TAG" ]; then | |
COMMIT_LIST=$(git log --pretty=format:"<li>%s</li>" --reverse) | |
else | |
COMMIT_LIST=$(git log ${LAST_TAG}..HEAD --pretty=format:"<li>%s</li>" --reverse) | |
fi | |
echo "COMMIT_LIST<<EOF" >> $GITHUB_ENV | |
echo "<ul>${COMMIT_LIST}</ul>" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.APP_VERSION }} | |
release_name: ${{ env.APP_VERSION }} | |
body: | | |
Changes in this release: | |
${{ env.COMMIT_LIST }} | |
draft: false | |
prerelease: false | |
- name: Build App | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
# Don't code sign as sparkle complains that the signature is corrupt. | |
# At this moment, we don't see any value in figuring out how exactly | |
# the code signature is corrupt. | |
run: xcodebuild -project AlfredExtraPane.xcodeproj -configuration Release -scheme AlfredExtraPane -derivedDataPath DerivedData clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | |
- name: Copy Built App | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
run: cp -r DerivedData/Build/Products/Release/AlfredExtraPane.app ./ | |
- name: Zip App | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
run: zip -r AlfredExtraPane.app.zip AlfredExtraPane.app | |
- name: Get Sparkle Private Signing Key | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
env: | |
SPARKLE_PRIVATE_SIGNING_KEY: ${{ secrets.SPARKLE_PRIVATE_SIGNING_KEY }} | |
run: | | |
echo "$SPARKLE_PRIVATE_SIGNING_KEY" > sparkle_private_signing.key | |
- name: Generate Appcast XML | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
run: bash gen-appcast.sh "$APP_VERSION" "$PREVIOUS_TAG" sparkle_private_signing.key | |
- name: Upload Appcast XML | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
id: upload-appcast-xml | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./appcast.xml | |
asset_name: appcast.xml | |
asset_content_type: application/xml | |
- name: Upload Release Asset | |
if: env.PREVIOUS_TAG != env.APP_VERSION | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./AlfredExtraPane.app.zip | |
asset_name: AlfredExtraPane.app.zip | |
asset_content_type: application/zip |