-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.78 KB
/
main.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
55
56
57
58
59
60
61
62
63
name: Update NuGet
on:
push:
branches:
- "main"
jobs:
build:
env:
BUILD_CONFIG: 'Release'
OUT_FOLDER: './out'
NUGET_TOKEN: ${{ secrets.NUGET_BLEND_ROBOTSTXT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: windows-latest
strategy:
matrix:
dotnet-versions: ['8.0']
name: Update_NuGet
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core SDK ${{matrix.dotnet-versions}}
uses: actions/[email protected]
with:
dotnet-version: ${{matrix.dotnet-versions}}
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: latest
- name: Install gitversion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]
- name: Install dependencies
run: dotnet restore
- name: Build Blend.Robots
run: dotnet pack .\Blend.RobotsTxt\Blend.RobotsTxt.csproj --no-restore -c ${{ env.BUILD_CONFIG }} -o ${{ env.OUT_FOLDER }} /p:ContinuousIntegrationBuild=true,version=${{ env.GitVersion_NuGetVersionV2 }}
- name: Publish Nuget to Nuget.org
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey $env:NUGET_TOKEN
- name: Release snapshot
id: release-snapshot
uses: actions/create-release@latest
with:
tag_name: ${{ env.GitVersion_NuGetVersionV2 }}
release_name: ${{ env.GitVersion_NuGetVersionV2 }}
draft: false
prerelease: false