Skip to content

Commit e11cdca

Browse files
committed
Implemented CI.
1 parent 792d382 commit e11cdca

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

Diff for: .github/workflows/ci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on:
2+
push:
3+
pull_request:
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: actions/setup-dotnet@v2
10+
with:
11+
dotnet-version: '6.0.x'
12+
- run: dotnet build

Diff for: .github/workflows/packaging.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
tags:
4+
- '*'
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
include:
11+
- platform: win-x64
12+
input_file: Quake2Sharp.exe
13+
output_file: Quake2Sharp-win-x64.exe
14+
- platform: win-arm64
15+
input_file: Quake2Sharp.exe
16+
output_file: Quake2Sharp-win-arm64.exe
17+
- platform: linux-x64
18+
input_file: Quake2Sharp
19+
output_file: Quake2Sharp-linux-x64
20+
- platform: linux-arm64
21+
input_file: Quake2Sharp
22+
output_file: Quake2Sharp-linux-arm64
23+
- platform: osx-x64
24+
input_file: Quake2Sharp
25+
output_file: Quake2Sharp-osx-x64
26+
- platform: osx-arm64
27+
input_file: Quake2Sharp
28+
output_file: Quake2Sharp-osx-arm64
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: actions/setup-dotnet@v2
32+
with:
33+
dotnet-version: '6.0.x'
34+
- run: dotnet publish -c Release --self-contained true -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -r ${{ matrix.platform }} -p:TargetPlatform=${{ matrix.platform }}
35+
- uses: svenstaro/upload-release-action@v2
36+
with:
37+
repo_token: ${{ secrets.GITHUB_TOKEN }}
38+
tag: ${{ github.ref }}
39+
file: Quake2Sharp/bin/Release/net6.0/${{ matrix.platform }}/publish/${{ matrix.input_file }}
40+
asset_name: ${{ matrix.output_file }}

Diff for: Quake2Sharp.sln

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ EndProject
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{01FD5072-2ED6-4C9B-9FDB-4122B9688EB5}"
66
ProjectSection(SolutionItems) = preProject
77
README.MD = README.MD
8+
.github\workflows\ci.yml = .github\workflows\ci.yml
89
EndProjectSection
910
EndProject
1011
Global

0 commit comments

Comments
 (0)