Skip to content

Commit

Permalink
Implemented CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
IceReaper committed Sep 8, 2022
1 parent 792d382 commit e11cdca
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- run: dotnet build
40 changes: 40 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: win-x64
input_file: Quake2Sharp.exe
output_file: Quake2Sharp-win-x64.exe
- platform: win-arm64
input_file: Quake2Sharp.exe
output_file: Quake2Sharp-win-arm64.exe
- platform: linux-x64
input_file: Quake2Sharp
output_file: Quake2Sharp-linux-x64
- platform: linux-arm64
input_file: Quake2Sharp
output_file: Quake2Sharp-linux-arm64
- platform: osx-x64
input_file: Quake2Sharp
output_file: Quake2Sharp-osx-x64
- platform: osx-arm64
input_file: Quake2Sharp
output_file: Quake2Sharp-osx-arm64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- 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 }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: Quake2Sharp/bin/Release/net6.0/${{ matrix.platform }}/publish/${{ matrix.input_file }}
asset_name: ${{ matrix.output_file }}
1 change: 1 addition & 0 deletions Quake2Sharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{01FD5072-2ED6-4C9B-9FDB-4122B9688EB5}"
ProjectSection(SolutionItems) = preProject
README.MD = README.MD
.github\workflows\ci.yml = .github\workflows\ci.yml
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit e11cdca

Please sign in to comment.