-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98d6ac8
commit 38a1480
Showing
2 changed files
with
99 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Deploy Signed Windows Installer to GitHub Releases | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
PYINSTALLER_COMPILE_BOOTLOADER: 1 | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
os: [windows-latest] | ||
steps: | ||
- name: Set env | ||
shell: bash | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- uses: actions/checkout@main | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
pip install . | ||
- name: Build windows executable | ||
working-directory: ./build-recipes | ||
run: | | ||
pip install -r win_build_requirements.txt | ||
pyinstaller -y --log-level=WARN win_DCOR-Aid.spec | ||
# Run the binary (the most simple test) | ||
dist\\DCOR-Aid\\DCOR-Aid.exe --version | ||
- name: Upload windows executable | ||
id: uploadBinaryArtifact | ||
uses: actions/upload-artifact@v4.4.3 | ||
with: | ||
name: pyjibe-executable | ||
path: ./build-recipes/dist/DCOR-Aid/DCOR-Aid.exe | ||
- name: Remove unsigned windows binary | ||
shell: bash | ||
run: | | ||
rm ./build-recipes/dist/DCOR-Aid/DCOR-Aid.exe | ||
- name: Sign Windows executable | ||
uses: signpath/github-action-submit-signing-request@v1 | ||
with: | ||
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | ||
organization-id: 'TODO' | ||
project-slug: 'DCOR-Aid' | ||
signing-policy-slug: 'test-signing' | ||
github-artifact-id: '${{steps.uploadBinaryArtifact.outputs.artifact-id}}' | ||
wait-for-completion: true | ||
output-artifact-directory: 'build-recipes/dist/DCOR-Aid' | ||
parameters: | | ||
Version: "${{ env.RELEASE_VERSION }}" | ||
- name: Create Windows installer | ||
working-directory: ./build-recipes | ||
run: | | ||
python win_make_iss.py | ||
ISCC.exe /Q win_pyjibe.iss | ||
- name: Upload windows installer | ||
id: uploadInstallerArtifact | ||
uses: actions/upload-artifact@v4.4.3 | ||
with: | ||
name: pyjibe-installer | ||
path: ./build-recipes/Output/*.exe | ||
- name: Remove unsigned windows installer | ||
shell: bash | ||
run: | | ||
rm -rf ./build-recipes/Output/*.exe | ||
- name: Sign Windows installer | ||
uses: signpath/github-action-submit-signing-request@v1 | ||
with: | ||
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | ||
organization-id: 'TODO' | ||
project-slug: 'DCOR-Aid' | ||
signing-policy-slug: 'test-signing' | ||
github-artifact-id: '${{steps.uploadInstallerArtifact.outputs.artifact-id}}' | ||
wait-for-completion: true | ||
output-artifact-directory: 'build-recipes/Output' | ||
parameters: | | ||
Version: "${{ env.RELEASE_VERSION }}" | ||
- name: Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: DCOR-Aid ${{ env.RELEASE_VERSION }} | ||
draft: true | ||
prerelease: false | ||
files: | | ||
./build-recipes/Output/*.exe |