Skip to content

Version bump

Version bump #19

Workflow file for this run

name: release
on: push
jobs:
release:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install the Apple certificate and provisioning profile
uses: apple-actions/import-codesign-certs@v1
with:
keychain: app-signing
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Get Sparkle key
env:
PRIVATE_SPARKLE_KEY: ${{ secrets.PRIVATE_SPARKLE_KEY }}
run: 'echo "${{ env.PRIVATE_SPARKLE_KEY }}" | base64 -d -o eddsa_private.key'
- name: Install Python Requirements
run: pip3 install requests xmltodict
- name: Install Brew Requirements
run: brew install coreutils pandoc
- name: Setup Sparkle
env:
SPARKLE_VERSION: '2.4.1'
SPARKLE_HASH: '1cbfba4fc55a4ac1c66767333c353870acbfe05a43d5756cc1204fd4ebf2ba77'
run: |
curl -L "https://github.com/sparkle-project/Sparkle/releases/download/${{ env.SPARKLE_VERSION }}/Sparkle-${{ env.SPARKLE_VERSION }}.tar.xz" -o Sparkle.tar.xz
if [[ '${{ env.SPARKLE_HASH }}' != "$(sha256sum Sparkle.tar.xz | cut -d " " -f 1)" ]]; then
echo "Sparkle download hash does not match!"
exit 1
fi
mkdir sparkle && cd sparkle
tar -xf ../Sparkle.tar.xz
- name: Build app
run: |
xcodebuild -project Hackintool.xcodeproj -target Hackintool -configuration Release build ARCHS=x86_64 -verbose CONFIGURATION_BUILD_DIR=build
rm -R build/EagerLinkingTBDs
rm -R build/Hackintool.app.dSYM
rm -R build/Hackintool.build
rm -R build/SharedPrecompiledHeaders
rm -R build/XCBuildData
- name: Get version
id: version
run: |
output=$(xcodebuild -project Hackintool.xcodeproj -configuration Release -showBuildSettings | grep MARKETING_VERSION | tr -d 'MARKETING_VERSION = ')
echo "::set-output name=result::$output"
- name: Compress Files
uses: thedoctor0/zip-release@0.7.1
with:
type: zip
directory: build
filename: Hackintool.zip
- name: Clean up
run: rm -R build/Hackintool.app
- name: Generate appcast.xml
run: sparkle/bin/generate_appcast --ed-key-file eddsa_private.key -o build/appcast.xml build
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/*
- name: Upload to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/*
tag: ${{ steps.version.outputs.result }}
overwrite: true
file_glob: true
- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |
security delete-keychain app-signing.keychain
rm eddsa_private.key