-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.44 KB
/
Copy pathbuild.yml
File metadata and controls
48 lines (41 loc) · 1.44 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
name: build
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
windows:
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Build and run safety tests
shell: powershell
run: powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1
- name: Read executable version
id: version
shell: powershell
run: |
$fileVersion = (Get-Item -LiteralPath .\dist\CDriveCare.exe).VersionInfo.FileVersion
if ($fileVersion -notmatch '^(\d+\.\d+\.\d+)\.0$') {
throw "Unexpected executable version: $fileVersion"
}
"version=$($Matches[1])" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
- name: Package in GitHub Actions
shell: powershell
env:
RELEASE_VERSION: ${{ steps.version.outputs.version }}
run: powershell -NoProfile -ExecutionPolicy Bypass -File .\.github\scripts\package-release.ps1 -Version $env:RELEASE_VERSION
- name: Upload binaries
uses: actions/upload-artifact@v7
with:
name: CDriveCare-v${{ steps.version.outputs.version }}-${{ github.sha }}
if-no-files-found: error
path: |
dist/CDriveCare.exe
dist/CDriveCare-v${{ steps.version.outputs.version }}-win.zip
dist/SHA256SUMS.txt