-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinternal-build-release-linux64.yml
More file actions
83 lines (66 loc) · 2.35 KB
/
internal-build-release-linux64.yml
File metadata and controls
83 lines (66 loc) · 2.35 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
74
75
76
77
78
79
80
81
82
83
name: 🐧 Build Release (Linux x64)
on:
workflow_call:
inputs:
version:
description: |
The version to release. (eg: 0.1.2, exclude the 'v'.).
required: true
type: string
jobs:
build-linux64:
runs-on: ubuntu-20.04
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: bash
run: |
echo "Current Directory $(pwd)"
# build the project
dotnet publish ./src/CodeQLToolkit.Core/CodeQLToolkit.Core.csproj /p:PublishProfile=./src/CodeQLToolkit.Core/Properties/PublishProfiles/Linux-Profile.pubxml
cp ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/linux-x64/CodeQLToolkit.Core ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/linux-x64/qlt
# repair permissions
chmod +x ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/linux-x64/qlt
chmod +r -R ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/linux-x64
- 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/linux-x64/tools/
env:
GH_TOKEN: ${{ github.token }}
- name: Build Bundle Archive
shell: bash
run: |
echo "Current Directory $(pwd)"
# create bundle
ARCHIVE="$(pwd)/qlt-linux-x86_64.zip"
pushd ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/linux-x64
zip -r $ARCHIVE .
popd
- 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-linux-x86_64.zip
env:
GH_TOKEN: ${{ github.token }}