-
Notifications
You must be signed in to change notification settings - Fork 10
89 lines (67 loc) · 2.18 KB
/
build_and_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build binaries and Upload to Release
on:
push:
branches: [ main ]
paths:
- "version"
workflow_dispatch: {}
jobs:
build_Windows:
name: Build Winsows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install poetry
poetry install
- name: Build
run: 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/ToolDelta.pvk -spc cert/ToolDelta.spc -pfx cert/ToolDelta.pfx -po 123456 -pi 123456
# & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe" sign /f cert/ToolDelta.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
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install poetry
poetry install
- name: Build
run: 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/*