-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 1.12 KB
/
build.yml
File metadata and controls
29 lines (27 loc) · 1.12 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
name: Build and Test
on: [push]
jobs:
Windows:
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Modify version number
uses: mingjun97/file-regex-replace@v1
with:
regex: \.0\<\/Version\>
replacement: ".${{github.run_number}}</Version>"
flags: "g" # Optional, defaults to "g"
include: 'RedBear\.Auth\.ServiceClient\.csproj' # Optional, defaults to ".*"
path: 'src\RedBear.Auth.ServiceClient\' # Optional, defaults to '.'
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
- name: Install dependencies
run: dotnet restore src/RedBear.Auth.ServiceClient.sln
- name: Build
run: dotnet build src/RedBear.Auth.ServiceClient.sln --configuration Release --no-restore
- name: Publish the package
if: github.ref == 'refs/heads/master'
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate