-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.19 KB
/
dotnet-ci.yml
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
name: .NET Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build Server launcher
strategy:
matrix:
kind: ['linux', 'windows', 'macos']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macos
os: macos-latest
target: osx-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Replace credentials
env:
CFAPITOKEN: '--FOOLEDYOU--'
shell: pwsh
run: (Get-Content -path "./cf-mc-server/Program.cs") -replace "--REPLACEME--", $env:CFAPITOKEN | Set-Content -Path "./cf-mc-server/Program.cs"
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
shell: bash
run: |
dotnet publish cf-mc-server/cf-mc-server.csproj --runtime "${{ matrix.target }}" -c Release -o published --self-contained