-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from beeware/download-stub
Remove stub binaries from app template
- Loading branch information
Showing
13 changed files
with
19 additions
and
75 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,67 +49,25 @@ jobs: | |
# Generate the stub app | ||
cd stub | ||
briefcase build macOS Xcode | ||
# Since the project is producing generic stub binary, we can't provide | ||
# any meaningful signing credentials in the Xcode project. Remove the | ||
# signature from the stub binaries. | ||
codesign --remove-signature "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" | ||
codesign --remove-signature "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" | ||
echo "Move the binaries into the final location" | ||
mv "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" Console-Stub-${{ env.PYTHON_TAG }} | ||
mv "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" GUI-Stub-${{ env.PYTHON_TAG }} | ||
- name: Upload Stub Artefact | ||
uses: actions/[email protected] | ||
with: | ||
name: stub-${{ matrix.python-version }} | ||
path: stub/*-Stub-${{ env.PYTHON_TAG }} | ||
echo "Build 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 }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub | ||
commit-stubs: | ||
name: Commit stub binaries | ||
needs: build-stubs | ||
runs-on: macos-latest | ||
steps: | ||
- name: Set Build Variables | ||
echo "Build GUI stub artefact" | ||
mv "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" Stub | ||
codesign --remove-signature Stub | ||
zip Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub | ||
- name: Upload Release Asset to S3 | ||
env: | ||
TAG_NAME: ${{ github.ref }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
export TAG=$(basename $TAG_NAME) | ||
export BRIEFCASE_VERSION="${TAG%-*}" | ||
export BUILD_NUMBER="${TAG#*-}" | ||
python -m pip install -U pip | ||
python -m pip install -U setuptools | ||
python -m pip install awscli | ||
echo "TAG=${TAG}" | tee -a $GITHUB_ENV | ||
echo "BRIEFCASE_VERSION=${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV | ||
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a $GITHUB_ENV | ||
if [ "${BRIEFCASE_VERSION}" == "dev" ]; then | ||
# We're on the development template; push to main | ||
echo "TEMPLATE_BRANCH=main" | tee -a $GITHUB_ENV | ||
else | ||
echo "TEMPLATE_BRANCH=v${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV | ||
fi | ||
- name: Checkout Template | ||
uses: actions/[email protected] | ||
|
||
- name: Download Stub Artefacts | ||
uses: actions/[email protected] | ||
with: | ||
pattern: stub-* | ||
path: stub | ||
merge-multiple: true | ||
|
||
- name: Commit stubs | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Brutus (robot)" | ||
# Move the binary into it's final location | ||
mv stub/*-Stub-* "{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS" | ||
# Ensure the binary is executable | ||
cd "{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS" | ||
chmod 755 *-Stub-* | ||
# Commit changes | ||
git add ./*-Stub-* | ||
git commit -m "AUTO: Update app binaries; build ${{ env.TAG }}" | ||
git push origin HEAD:${{ env.TEMPLATE_BRANCH }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/macOS/Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip | ||
aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/macOS/GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip |
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
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
Binary file removed
BIN
-6.99 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.10
Binary file not shown.
Binary file removed
BIN
-10.1 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.11
Binary file not shown.
Binary file removed
BIN
-12.6 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.12
Binary file not shown.
Binary file removed
BIN
-6.47 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.8
Binary file not shown.
Binary file removed
BIN
-6.96 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.9
Binary file not shown.
Binary file removed
BIN
-7.01 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/GUI-Stub-3.10
Binary file not shown.
Binary file removed
BIN
-10.1 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/GUI-Stub-3.11
Binary file not shown.
Binary file removed
BIN
-12.6 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/GUI-Stub-3.12
Binary file not shown.
Binary file removed
BIN
-6.47 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/GUI-Stub-3.8
Binary file not shown.
Binary file removed
BIN
-6.96 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/GUI-Stub-3.9
Binary file not shown.