Skip to content

Commit

Permalink
ci: prepare for signpath
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 8, 2025
1 parent 06dacf0 commit 575c8fb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,53 @@ jobs:
- name: Build windows executables
shell: bash
run: ./win_build.sh
- name: Upload windows executables
id: uploadBinaryArtifact
uses: actions/[email protected]
with:
name: dctools-executables
path: ./dist/DC-tools-for-Windows/*.exe
- name: Remove unsigned windows binaries
shell: bash
run: |
rm ./dist/DC-tools-for-Windows/*.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: 'DC-tools-for-Windows'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{steps.uploadBinaryArtifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'dist/DC-tools-for-Windows'
parameters: |
Version: "${{ env.RELEASE_VERSION }}"
- name: Create Windows installer
shell: bash
run: ./win_package.sh
- name: Upload windows installer
id: uploadInstallerArtifact
uses: actions/[email protected]
with:
name: dctools-installer
path: ./innosetup/Output/*.exe
- name: Remove unsigned windows installer
shell: bash
run: |
rm -rf ./innosetup/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: 'DC-tools-for-Windows'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{steps.uploadBinaryArtifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'innosetup/Output'
parameters: |
Version: "${{ env.RELEASE_VERSION }}"
- name: Release Assets
uses: softprops/action-gh-release@v1
with:
Expand All @@ -35,5 +82,8 @@ jobs:
prerelease: false
body: |
![](https://img.shields.io/github/downloads/DC-Analysis/DC-tools-for-Windows/${{ env.RELEASE_VERSION }}/total.svg)
This installer and the executables therein are signed: [Code Signing Policy](https://github.com/DC-analysis/DC-tools-for-Windows#code-signing-policy).
files: |
./innosetup/Output/*.exe
3 changes: 0 additions & 3 deletions win_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ pip install -r requirements.txt

# build executables
pyinstaller pyinstaller/dc_tools.spec

# build the installers
ISCC.exe innosetup/dc_tools.iss
11 changes: 11 additions & 0 deletions win_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# This only works if you have git, bash, InnoSetup and Python3 installed.
# You should already have activated your environment before
# running this script.
set -e
set -x

cd $(dirname "$BASH_SOURCE[0]}")

# package executables as installer
ISCC.exe innosetup/dc_tools.iss

0 comments on commit 575c8fb

Please sign in to comment.