-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.23 KB
/
build.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
50
51
52
53
54
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
DOTNET_NOLOGO: 1
VERSION: 0.0.1
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Test Debug
run: |
./build/test_all.ps1 Debug prod
- name: Test Release
run: |
./build/test_all.ps1 Release prod
- name: NuGet Publish
if: ${{ github.ref == 'refs/heads/master' }}
shell: pwsh
run: |
./build/pack.ps1
- name: Set variables
run: |
$ver = Get-Content -Path ./build/pkg.version
echo "VERSION=$ver" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo $ver
- name: Create Tag
if: ${{ github.ref == 'refs/heads/master' }}
uses: richardsimko/update-tag@v1
with:
tag_name: ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}