-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.64 KB
/
ci.yml
File metadata and controls
67 lines (55 loc) · 1.64 KB
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
name: Build Project and Upload Artifact
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build
run: |
pyinstaller --onefile --noconsole main.py
mv dist/main.exe REPENTOGONUpdater.exe
- name: Calculate SHA256
shell: powershell
run: |
$PSDefaultParameterValues['*:Encoding'] = 'Default'
$OutputEncoding = [System.Text.Utf8Encoding]::new($false)
Get-FileHash .\REPENTOGONUpdater.exe | Select-Object -ExpandProperty Hash > hash.txt
- name: Determine next build number
uses: MCKanpolat/[email protected]
id: versioning
with:
releaseType: patch
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release
uses: ncipollo/release-action@v1
if: "contains(github.event.head_commit.message, 'chore: release') && github.event_name != 'pull_request'"
with:
artifacts: "REPENTOGONUpdater.exe,hash.txt"
tag: ${{steps.versioning.outputs.version}}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: REPENTOGONInstaller
path: REPENTOGONUpdater.exe
retention-days: 30