-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (28 loc) · 1.03 KB
/
release.yml
File metadata and controls
35 lines (28 loc) · 1.03 KB
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
name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Release
if: github.event.base_ref == 'refs/heads/master'
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- id: get_version
uses: battila7/get-version-action@v2
- name: Build
run: msbuild /v:m /p:Configuration=Release /t:Restore,Clean,Build,Pack /p:Version=${{ steps.get_version.outputs.version-without-v }} src/ConfigSettings.sln
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Publish the package to nuget.org
shell: cmd
run: dotnet nuget push src\ConfigSettings\bin\Release\ConfigSettings.${{ steps.get_version.outputs.version-without-v }}.nupkg --skip-duplicate -s https://api.nuget.org/v3/index.json -k "%NUGET_AUTH_TOKEN%"
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}