-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinternal-build-release-win64.yml
More file actions
73 lines (62 loc) · 2.2 KB
/
internal-build-release-win64.yml
File metadata and controls
73 lines (62 loc) · 2.2 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
67
68
69
70
71
72
73
name: 🪟 Build Release (Windows x64)
on:
workflow_call:
inputs:
version:
description: |
The version to release. (eg: 0.1.2, exclude the 'v'.).
required: true
type: string
jobs:
build-win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Build Bundle
shell: pwsh
run: |
echo "Current Directory $(Get-Location)"
# build the project
dotnet publish .\src\CodeQLToolkit.Core\CodeQLToolkit.Core.csproj /p:PublishProfile=.\src\CodeQLToolkit.Core\Properties\PublishProfiles\Windows-x64.pubxml
Copy-Item .\src\CodeQLToolkit.Core\bin\Release\net6.0\publish\windows-x64\CodeQLToolkit.Core.exe .\src\CodeQLToolkit.Core\bin\Release\net6.0\publish\windows-x64\qlt.exe
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build CodeQL Bundle Tool for Packaging
shell: pwsh
run: |
# need this for the bundling to work.
pip install poetry
pip install -U pyinstaller
# run the packaging
.\scripts\build_codeql_bundle_dist.ps1 -Version 0.4.0 -WorkDirectory dist -DestinationDirectory .\src\CodeQLToolkit.Core\bin\Release\net6.0\publish\windows-x64\tools\
env:
GH_TOKEN: ${{ github.token }}
- name: Build Bundle Archive
shell: pwsh
run: |
# create bundle
$ARCHIVE="$(Get-Location)/qlt-windows-x64.zip"
Push-Location .\src\CodeQLToolkit.Core\bin\Release\net6.0\publish\windows-x64
Compress-Archive -Path "*" -DestinationPath $ARCHIVE
Pop-Location
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: qlt-dist
path: qlt*.zip
- name: Upload Build Artifacts
shell: pwsh
run: |
Write-Host (Get-Location)
gh release upload v${{inputs.version}} ./qlt-windows-x64.zip
env:
GH_TOKEN: ${{ github.token }}