Build binaries and Upload to Release #40
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 binaries and Upload to Release | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "version" | |
workflow_dispatch: {} | |
jobs: | |
build_Windows_job: | |
name: build_Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies and ToolDelta Build | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r requirements.txt | |
pyinstaller -F main.py -n ToolDelta.exe | |
- name: Convert certificate and sign binary | |
shell: pwsh | |
run: | | |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\pvk2pfx.exe" -pvk cert/main.pvk -spc cert/main.spc -pfx cert/main.pfx -po 123456 -pi 123456 | |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe" sign /f cert/main.pfx /p 123456 /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a dist/ToolDelta.exe | |
- name: Get version | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
run: echo "::set-env name=VERSION::$(more version)" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{env.VERSION}} | |
name: ${{env.VERSION}} | |
files: | | |
dist/* | |
build_Linux_job: | |
name: build_Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies and ToolDelta Build | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r requirements.txt | |
pyinstaller -F main.py -n ToolDelta | |
- name: Get version | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
run: echo "::set-env name=VERSION::$(cat version)" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{env.VERSION}} | |
name: ${{env.VERSION}} | |
files: | | |
dist/* |