chore: bump version to 2.1.0 #283
Workflow file for this run
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 OSX binary | |
env: | |
PYAPP_DOWNLOAD: https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz | |
on: | |
workflow_call: | |
workflow_dispatch: {} | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Setup XCode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Determine App Version | |
working-directory: client/ | |
run: | | |
python ../.github/scripts/get_version.py | |
- name: Setup PyAPP and build | |
working-directory: client/ | |
env: | |
PYAPP_FULL_ISOLATION: 1 | |
PYAPP_PROJECT_NAME: gefyra | |
PYAPP_EXEC_SPEC: gefyra.cli.main:main | |
PYAPP_PIP_EXTRA_ARGS: click alive-progress tabulate cli-tracker | |
PYAPP_DISTRIBUTION_EMBED: 1 | |
run: | | |
poetry build | |
curl ${PYAPP_DOWNLOAD} -Lo pyapp-source.tar.gz | |
tar -xzf pyapp-source.tar.gz | |
mv pyapp-v* pyapp-latest | |
cd pyapp-latest | |
cargo build --release | |
mv target/release/pyapp ../../gefyra && chmod +x ../../gefyra | |
cp ../README.md ../../README.md | |
- name: Codesign app bundle | |
# Extract the secrets we defined earlier as environment variables | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
env: | |
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }} | |
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }} | |
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} | |
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }} | |
run: | | |
# Turn our base64-encoded certificate back to a regular .p12 file | |
echo $MACOS_CERTIFICATE | base64 --decode -o certificate.p12 | |
# We need to create a new keychain, otherwise using the certificate will prompt | |
# with a UI dialog asking for the certificate password, which we can't | |
# use in a headless CI environment | |
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain | |
set +e | |
security import --help | |
set -e | |
security import certificate.p12 -k ~/Library/Keychains/build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain | |
# We finally codesign our app bundle, specifying the Hardened runtime option | |
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime ./gefyra -v | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-darwin-universal | |
path: | | |
gefyra | |
LICENSE | |
README.md | |
retention-days: 5 | |
- name: Create release zip | |
if: ${{ github.event.release && github.event.action == 'published' }} | |
run: zip gefyra-${{ env.PYAPP_PROJECT_VERSION }}-darwin-universal.zip "gefyra" "LICENSE" "README.md" | |
- name: Attach files to release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ github.event.release && github.event.action == 'published' }} | |
with: | |
files: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-darwin-universal.zip |