mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
78 lines
2.6 KiB
YAML
78 lines
2.6 KiB
YAML
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
name: build KCC for windows with docker
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# - name: Set up Python
|
|
# uses: actions/setup-python@v4
|
|
# with:
|
|
# python-version: 3.11
|
|
# cache: 'pip'
|
|
# - name: Install python dependencies
|
|
# run: |
|
|
# python -m pip install --upgrade pip setuptools wheel pyinstaller
|
|
# pip install -r requirements.txt
|
|
# - name: build binary
|
|
# run: |
|
|
# pyi-makespec -F -i icons\\comic2ebook.ico -n KCC_test -w --noupx kcc.py
|
|
- name: Package Application
|
|
uses: JackMcKew/pyinstaller-action-windows@main
|
|
with:
|
|
path: .
|
|
spec: ./kcc.spec
|
|
- name: Package Application
|
|
uses: JackMcKew/pyinstaller-action-windows@main
|
|
with:
|
|
path: .
|
|
spec: ./kcc-c2e.spec
|
|
- name: Package Application
|
|
uses: JackMcKew/pyinstaller-action-windows@main
|
|
with:
|
|
path: .
|
|
spec: ./kcc-c2p.spec
|
|
- name: rename binaries
|
|
run: |
|
|
version_built=$(cat kindlecomicconverter/__init__.py | grep version | awk '{print $3}' | sed "s/[^.0-9b]//g")
|
|
mv dist/windows/kcc.exe dist/windows/KCC_${version_built}.exe
|
|
mv dist/windows/kcc-c2e.exe dist/windows/KCC_c2e_${version_built}.exe
|
|
mv dist/windows/kcc-c2p.exe dist/windows/KCC_c2p_${version_built}.exe
|
|
|
|
- name: upload-unsigned-artifact
|
|
id: upload-unsigned-artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-build
|
|
path: dist/windows/*.exe
|
|
|
|
- id: optional_step_id
|
|
uses: signpath/github-action-submit-signing-request@v1.1
|
|
with:
|
|
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
|
|
organization-id: '1dc1bad6-4a8c-4f85-af30-5c5d3d392ea6'
|
|
project-slug: 'kcc'
|
|
signing-policy-slug: 'test-signing'
|
|
github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
|
|
wait-for-completion: true
|
|
output-artifact-directory: 'dist/windows/signed/'
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
prerelease: true
|
|
generate_release_notes: true
|
|
files: |
|
|
CHANGELOG.md
|
|
LICENSE.txt
|
|
dist/windows/signed/*.exe
|