-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.16 KB
/
Official.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
name: Official Build
on:
push:
branches:
- main
- rel/*
tags:
- v*.*.*
env:
ArtifactsDirectoryName: 'artifacts'
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
ContinuousIntegrationBuild: 'true'
jobs:
build:
runs-on: windows-latest
environment: Production
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-quality: 'preview'
dotnet-version: |
8.x
- name: Build Solution
run: dotnet build "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}\build.binlog"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: ${{ env.ArtifactsDirectoryName }}
path: ${{ env.ArtifactsDirectoryName }}
- name: Push Packages
run: dotnet nuget push --skip-duplicate --api-key ${{ secrets.NuGetApiKey }} ${{ env.ArtifactsDirectoryName }}\**\*.nupkg
if: ${{ startsWith(github.ref, 'refs/tags/v') }}