Skip to content

Syntax fix.

Syntax fix. #11

Workflow file for this run

name: Update binary
on:
push:
tags:
- 'b*'
jobs:
build-stubs:
name: Build stub binaries
runs-on: macos-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13-dev" ]
outputs:
BUILD_NUMBER: ${{ steps.build-vars.outputs.BUILD_NUMBER }}
steps:
- name: Set Build Variables
id: build-vars
env:
TAG_NAME: ${{ github.ref }}
run: |
export BUILD_NUMBER=$(basename $TAG_NAME)
export PYTHON_TAG=$(python -c "print('${{ matrix.python-version }}'.split('-')[0])")
echo "PYTHON_TAG=${PYTHON_TAG}" | tee -a $GITHUB_ENV
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a $GITHUB_ENV
- name: Checkout Template
uses: actions/checkout@v4.1.7
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
# TODO - Revert to the development version of Briefcase
# Use the development version of Briefcase
# python -m pip install git+https://github.com/beeware/briefcase.git
python -m pip install git+https://github.com/freakboy3742/briefcase.git@version-bumps
- name: Generate Xcode App Template
run: |
# Generate the stub app
cd stub
briefcase build macOS Xcode
echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} console stub artefact"
mv "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" Stub
codesign --remove-signature Stub
zip Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip Stub
echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} GUI stub artefact"
mv "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" Stub
codesign --remove-signature Stub
zip GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip Stub
echo "Stub binaries:"
ls -1 *.zip
- name: Upload build artefacts
uses: actions/upload-artifact@v4.3.5
with:
name: ${{ env.PYTHON_TAG }}-stubs
path: stub/*.zip
- name: Upload Release Asset to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
python -m pip install -U pip
python -m pip install -U setuptools
python -m pip install awscli
aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/macOS/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip
aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/macOS/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip
make-release:
name: Make Release
runs-on: macOS-latest
needs: [ build-stubs ]
steps:
- name: Get build artifacts
uses: actions/download-artifact@v4.1.8
with:
path: dist
merge-multiple: true
- name: Create Release
uses: ncipollo/release-action@v1.14.0
with:
name: ${{ needs.build-stubs.outputs.BUILD_NUMBER }}
tag: ${{ needs.build-stubs.outputs.BUILD_NUMBER }}
draft: true
body: |
Build ${{ needs.build-stubs.outputs.BUILD_NUMBER }} of the Briefcase macOS stub binary.
Includes support for Python 3.9-3.13.
artifacts: "dist/*"