|
| 1 | +name: Build - Windows Multi Arch Signed (briefcase) |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 7 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 8 | + |
| 9 | +env: |
| 10 | + FORCE_COLOR: "1" |
| 11 | + |
| 12 | +defaults: |
| 13 | + run: |
| 14 | + shell: bash |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + name: Package |
| 19 | + runs-on: ${{ matrix.runs-on }} |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + target: [ "x64", "ARM64" ] |
| 24 | + include: |
| 25 | + - target: "x64" |
| 26 | + output-format: "app" |
| 27 | + runs-on: "windows-latest" |
| 28 | + platform: "windows" |
| 29 | + pre-command: | |
| 30 | + python -m pip install PySide6 |
| 31 | + pyside6-rcc ./artemis.qrc -o artemis/resources.py |
| 32 | + - target: "ARM64" |
| 33 | + output-format: "app" |
| 34 | + runs-on: "windows-11-vs2026-arm" |
| 35 | + platform: "windows" |
| 36 | + pre-command: | |
| 37 | + python -m pip install PySide6 |
| 38 | + pyside6-rcc ./artemis.qrc -o artemis/resources.py |
| 39 | +
|
| 40 | + steps: |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v6 |
| 43 | + |
| 44 | + - name: Setup Python |
| 45 | + uses: actions/setup-python@v6 |
| 46 | + with: |
| 47 | + python-version: "3.13" |
| 48 | + |
| 49 | + - name: Install Briefcase |
| 50 | + run: | |
| 51 | + python -m pip install -U pip setuptools wheel |
| 52 | + python -m pip install briefcase |
| 53 | +
|
| 54 | + - name: Setup Environment |
| 55 | + run: | |
| 56 | + ${{ matrix.pre-command }} |
| 57 | +
|
| 58 | + - name: Build App |
| 59 | + run: | |
| 60 | + briefcase build \ |
| 61 | + ${{ matrix.platform }} \ |
| 62 | + ${{ matrix.output-format }} \ |
| 63 | + --no-input --log \ |
| 64 | + ${{ matrix.briefcase-args }} |
| 65 | +
|
| 66 | + - name: Package App |
| 67 | + run: | |
| 68 | + briefcase package \ |
| 69 | + ${{ matrix.platform }} \ |
| 70 | + ${{ matrix.output-format }} \ |
| 71 | + --adhoc-sign --no-input --log \ |
| 72 | + ${{ matrix.briefcase-args }} |
| 73 | +
|
| 74 | + - name: Rename MSI to include Architecture |
| 75 | + run: | |
| 76 | + mv dist/*.msi "dist/Artemis-${{ matrix.target }}.msi" |
| 77 | +
|
| 78 | + - name: Upload Temporary MSI |
| 79 | + uses: actions/upload-artifact@v7 |
| 80 | + with: |
| 81 | + name: temp-Artemis-${{ matrix.target }} |
| 82 | + path: dist/*.msi |
| 83 | + if-no-files-found: error |
| 84 | + |
| 85 | + - name: Upload Log |
| 86 | + if: failure() |
| 87 | + uses: actions/upload-artifact@v7 |
| 88 | + with: |
| 89 | + name: Log-Failure-${{ matrix.target }} |
| 90 | + path: logs/* |
| 91 | + |
| 92 | + code-signing: |
| 93 | + name: Combine MSIs into single zip |
| 94 | + needs: build |
| 95 | + runs-on: windows-latest |
| 96 | + steps: |
| 97 | + - name: Merge Artifacts |
| 98 | + id: merge-unsigned |
| 99 | + uses: actions/upload-artifact/merge@v7 |
| 100 | + with: |
| 101 | + name: Artemis-Windows-Installers |
| 102 | + pattern: temp-Artemis-* |
| 103 | + delete-merged: true |
| 104 | + |
| 105 | + - name: Submit Signing Request |
| 106 | + uses: signpath/github-action-submit-signing-request@v2 |
| 107 | + with: |
| 108 | + api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' |
| 109 | + organization-id: '7ca51cc2-9ba1-444a-ad44-b6544f4cdee8' |
| 110 | + project-slug: 'Artemis' |
| 111 | + signing-policy-slug: 'test-signing' |
| 112 | + github-artifact-id: '${{ steps.merge-unsigned.outputs.artifact-id }}' |
| 113 | + wait-for-completion: true |
| 114 | + output-artifact-directory: 'signed-installers' |
| 115 | + |
| 116 | + - name: Upload Signed Artifact |
| 117 | + uses: actions/upload-artifact@v7 |
| 118 | + with: |
| 119 | + name: Artemis-Windows-Installers |
| 120 | + path: signed-installers |
0 commit comments