Skip to content

update changelog

update changelog #9

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_PyJibe.spec
# Run the binary (the most simple test)
dist\\PyJibe\\PyJibe.exe --version
- name: Upload windows executable
id: uploadBinaryArtifact
uses: actions/[email protected]
with:
name: pyjibe-executable
path: ./build-recipes/dist/PyJibe/PyJibe.exe
- name: Remove unsigned windows binary
run: |
rm ./build-recipes/dist/PyJibe/PyJibe.exe
- name: Sign Windows executable
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: 'f4659968-cc5d-43ff-9308-df0032168ad9'
project-slug: 'PyJibe'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{steps.uploadBinaryArtifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'build-recipes/dist/PyJibe'
parameters: |
# must be JSON, but we cannot nest env in a `toJSON` call
Version: '"${{ env.RELEASE_VERSION }}"'
Release_Tag: ${{ 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/[email protected]
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: 'f4659968-cc5d-43ff-9308-df0032168ad9'
project-slug: 'PyJibe'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{steps.uploadInstallerArtifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'build-recipes/Output'
parameters: |
# must be JSON, but we cannot nest env in a `toJSON` call
Version: '"${{ env.RELEASE_VERSION }}"'
Release_Tag: ${{ env.RELEASE_VERSION }}
- name: Rename windows installer to signed
shell: bash
run: |
pushd ./build-recipes/Output/
for file in *.exe ; do mv $file ${file//PyJibe/PyJibe_signed} ; done
- name: Release Assets
uses: softprops/action-gh-release@v1
with:
name: PyJibe ${{ env.RELEASE_VERSION }}
draft: true
prerelease: false
files: |
./build-recipes/dist/*.dmg
./build-recipes/dist/*.pkg
./build-recipes/Output/*.exe