Skip to content

Commit 691e818

Browse files
committed
adding other platforms
1 parent 3c69f7e commit 691e818

File tree

4 files changed

+127
-1
lines changed

4 files changed

+127
-1
lines changed

.github/workflows/internal-build-release-linux64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Release (Linux x64)
1+
name: 🐧 Build Release (Linux x64)
22

33
on:
44
workflow_call:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 🍏 Build Release (MacOS arm64)
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
description: |
8+
The version to release. (eg: 0.1.2, exclude the 'v'.).
9+
required: true
10+
type: string
11+
12+
jobs:
13+
build-macos64:
14+
runs-on: macos-14 # note this is arm64
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: 6.0.x
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build -c Release --no-restore
26+
27+
- name: Build Bundle (MacOS)
28+
shell: bash
29+
run: |
30+
echo "Current Directory $(pwd)"
31+
# build the project
32+
dotnet publish ./src/CodeQLToolkit.Core/CodeQLToolkit.Core.csproj /p:PublishProfile=./src/CodeQLToolkit.Core/Properties/PublishProfiles/MacOS-arm64-Profile.pubxml
33+
cp ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/macos-arm64/CodeQLToolkit.Core ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/macos-arm64/qlt
34+
35+
# repair permissions
36+
chmod +x ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/macos-arm64/qlt
37+
chmod +r -R ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/macos-arm64
38+
39+
# create bundle
40+
ARCHIVE="$(pwd)/qlt-macos-arm64.zip"
41+
pushd ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/macos-arm64
42+
zip -r $ARCHIVE .
43+
popd
44+
45+
- name: Upload build artifacts
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: qlt-dist
49+
path: qlt*.zip
50+
51+
- name: Upload Build Artifacts
52+
shell: pwsh
53+
run: |
54+
Write-Host (Get-Location)
55+
gh release upload v${{inputs.version}} ./qlt-macos-arm64.zip
56+
env:
57+
GH_TOKEN: ${{ github.token }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 🪟 Build Release (Windows x64)
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
description: |
8+
The version to release. (eg: 0.1.2, exclude the 'v'.).
9+
required: true
10+
type: string
11+
12+
jobs:
13+
build-win64:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: 6.0.x
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build -c Release --no-restore
26+
27+
- name: Build Bundle (MacOS)
28+
shell: bash
29+
run: |
30+
echo "Current Directory $(pwd)"
31+
# build the project
32+
dotnet publish ./src/CodeQLToolkit.Core/CodeQLToolkit.Core.csproj /p:PublishProfile=./src/CodeQLToolkit.Core/Properties/PublishProfiles/Windows-x64-Profile.pubxml
33+
cp ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/windows-x64/CodeQLToolkit.Core ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/windows-x64/qlt
34+
35+
# repair permissions
36+
chmod +x ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/windows-x64/qlt
37+
chmod +r -R ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/windows-x64
38+
39+
# create bundle
40+
ARCHIVE="$(pwd)/qlt-windows-x64.zip"
41+
pushd ./src/CodeQLToolkit.Core/bin/Release/net6.0/publish/windows-x64
42+
zip -r $ARCHIVE .
43+
popd
44+
45+
- name: Upload build artifacts
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: qlt-dist
49+
path: qlt*.zip
50+
51+
- name: Upload Build Artifacts
52+
shell: pwsh
53+
run: |
54+
Write-Host (Get-Location)
55+
gh release upload v${{inputs.version}} ./qlt-windows-x64.zip
56+
env:
57+
GH_TOKEN: ${{ github.token }}

.github/workflows/internal-release-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,15 @@ jobs:
2929
needs: create-draft-release
3030
with:
3131
version: ${{inputs.version}}
32+
33+
build-macos64:
34+
uses: ./.github/workflows/internal-build-release-macos64.yml
35+
needs: create-draft-release
36+
with:
37+
version: ${{inputs.version}}
38+
39+
build-win64:
40+
uses: ./.github/workflows/internal-build-release-win64.yml
41+
needs: create-draft-release
42+
with:
43+
version: ${{inputs.version}}

0 commit comments

Comments
 (0)