Skip to content

Release Automation

Release Automation #11

Workflow file for this run

name: Release Build for macOS
on:
workflow_dispatch:
inputs:
ref:
description: 'Ref to build (branch, tag or SHA)'
required: false
default: 'master'
pull_request:
branches:
[ master ]
jobs:
build:
name: Build Sourcery for macOS
runs-on: macos-13
steps:
- name: Set Xcode 15.1.0
run: sudo xcode-select -s /Applications/Xcode_15.1.0.app/Contents/Developer
- name: Print Current Xcode
run: xcode-select -p
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
- name: Build it
run: |
BUILD_DIR='${HOME}/build/'
CLI_DIR='${HOME}/bin/'
output_path="${CLI_DIR}/sourcery"
mkdir -p $CLI_DIR
swift build --disable-sandbox -c release --arch arm64 --build-path $BUILD_DIR
swift build --disable-sandbox -c release --arch x86_64 --build-path $BUILD_DIR
lipo -create -output $output_path ${BUILD_DIR}arm64-apple-macosx/release/sourcery ${BUILD_DIR}x86_64-apple-macosx/release/sourcery
strip -rSTX ${output_path}
mv $output_path "${HOME}/sourcery"
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: sourcery
path: ~/sourcery
retention-days: 5