more debug #257
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 Installer | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build-installer: | |
timeout-minutes: 80 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14] # [ubuntu-22.04, windows-2022, macos-13, macos-14] | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Upgrade package installer for Python | |
run: python -m pip install --upgrade pip | |
- name: Install Python dependences | |
run: | | |
python -m pip install flit | |
flit install --only-deps # Install the dependencies, but not the EasyDiffractionApp package itself | |
- name: Add extra info to pyproject.toml | |
run: python utils.py --update | |
- name: Declare env variables on push only | |
if: github.event_name == 'push' | |
shell: bash | |
run: echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Declare env variables on pull_request only | |
if: github.event_name == 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_ENV | |
- name: Declare env variables on push and pull_request | |
shell: bash | |
run: | | |
echo "MATRIX_OS=${{ matrix.os }}" >> $GITHUB_ENV | |
echo "RUNNER_OS=${{ runner.os }}" >> $GITHUB_ENV | |
echo "RUNNER_ARCH=${{ runner.arch }}" >> $GITHUB_ENV | |
echo "TEMP_ARTIFACT_SUFFIX=$(python utils.py --get release.app_name)" >> $GITHUB_ENV | |
echo "APP_NAME=$(python utils.py --get release.app_name)" >> $GITHUB_ENV | |
echo "PACKAGE_NAME=$(python utils.py --get project.name)" >> $GITHUB_ENV | |
echo "PACKAGE_PATH=$GITHUB_WORKSPACE/$(python utils.py --get project.name)" >> $GITHUB_ENV | |
echo "RELEASE_TAG=$(python utils.py --get ci.app.info.release_tag)" >> $GITHUB_ENV | |
echo "RELEASE_TITLE=$(python utils.py --get ci.app.info.release_title)" >> $GITHUB_ENV | |
echo "SCRIPTS_PATH=$(python utils.py --get ci.project.subdirs.scripts)" >> $GITHUB_ENV | |
echo "DISTRIBUTION_PATH=$(python utils.py --get ci.project.subdirs.distribution)" >> $GITHUB_ENV | |
echo "DOWNLOAD_PATH=$(python utils.py --get ci.project.subdirs.download)" >> $GITHUB_ENV | |
echo "QTIFW_PATH=$(python utils.py --get ci.qtifw.setup.installation_path.${{ runner.os }})" >> $GITHUB_ENV | |
echo "PYTHON_PACKAGES_PATH=$(python utils.py --get ci.cache.python_packages_path)" >> $GITHUB_ENV | |
echo "GIT_INSTALL_URL=git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@${{ env.BRANCH_NAME }}" >> $GITHUB_ENV | |
- name: Create python resources file | |
run: pyside6-rcc ${{ env.PACKAGE_PATH }}/resources.qrc -o ${{ env.PACKAGE_PATH }}/resources.py | |
- name: Create freezed python app bundle with PyInstaller | |
run: python ${{ env.SCRIPTS_PATH }}/FreezeApp.py | |
- name: Create offline app installer from freezed app bundle with QtIFW | |
run: > | |
python ${{ env.SCRIPTS_PATH }}/MakeInstaller.py | |
${{ env.BRANCH_NAME }} ${{ matrix.os }} | |
- name: Sign offline app installer (version 1) | |
if: github.event_name == 'push' | |
run: > | |
python ${{ env.SCRIPTS_PATH }}/SignAppInstaller.py | |
${{ env.BRANCH_NAME }} ${{ matrix.os }} | |
${{ secrets.MACOS_CERTIFICATE_ENCODED }} ${{ secrets.MACOS_CERTIFICATE_PASSWORD }} | |
${{ secrets.APPSTORE_NOTARIZATION_USERNAME }} ${{ secrets.APPSTORE_NOTARIZATION_PASSWORD }} | |
- name: Sign offline app installer (version 2) | |
if: github.event_name == 'push' | |
uses: lando/code-sign-action@v2 | |
with: | |
file: 'ci/distribution/EasyDiffraction_v0.9.1a0_macos-14-AppleSilicon.app/Contents/MacOS/EasyDiffraction_v0.9.1a0_macos-14-AppleSilicon' | |
certificate-data: ${{ secrets.MACOS_CERTIFICATE_ENCODED }} | |
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }} | |
apple-notary-user: ${{ secrets.APPSTORE_NOTARIZATION_USERNAME }} | |
apple-notary-password: ${{ secrets.APPSTORE_NOTARIZATION_PASSWORD }} | |
apple-notary-tool: notarytool | |
apple-team-id: 'W2AG9MPZ43' | |
options: --options runtime --entitlements entitlements.xml |