Skip to content

Commit cdb1807

Browse files
authored
Create fop.nuget.yml
1 parent 3260276 commit cdb1807

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/fop.nuget.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Fop.Nuget
2+
3+
on:
4+
create:
5+
branches:
6+
- release/**
7+
8+
jobs:
9+
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
Build_Config: Release
16+
Solution: fop.sln
17+
Test_Project_Path: Fop.Tests\Fop.Tests.csproj
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Get Build Version
23+
run: |
24+
Import-Module .\build\GetBuildVersion.psm1
25+
Write-Host $Env:GITHUB_REF
26+
$version = GetBuildVersion -VersionString $Env:GITHUB_REF
27+
echo "Build_Version=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
28+
shell: pwsh
29+
30+
- name: Install .NET
31+
uses: actions/setup-dotnet@v3
32+
with:
33+
dotnet-version: 6.0.x
34+
35+
- name: Restore dependencies
36+
run: nuget restore $Solution
37+
38+
- name: Build
39+
run: dotnet build $Solution --configuration $Build_Config -p:Version=$Build_Version --no-restore
40+
41+
- name: Publish
42+
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

0 commit comments

Comments
 (0)