-
Notifications
You must be signed in to change notification settings - Fork 21
51 lines (41 loc) · 1.33 KB
/
publish.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
name: publish to nuget
on:
push:
paths: # When the file with assembly version changed
- 'FemDesign.Core/Properties/GlobalAssemblyInfo.cs'
- '.github/workflows/publish.yml'
branches: # Only on push to master
- master
jobs:
publish:
name: build, pack & publish to nuget.org
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Create Build Directory
run: mkdir _build
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.x'
- name: Restore Packages
run: nuget restore FemDesign.Core/FemDesign.Core.csproj -SolutionDirectory ./
- name: Build Solution
run: |
dotnet build .\FemDesign.Core\FemDesign.Core.csproj -c Release
- name: Pack nuget
run: |
nuget pack FemDesign.Core\ -Properties Configuration=Release
- name: Publish nuget
run: |
nuget push *.nupkg -Source https://api.nuget.org/v3/index.json
- name: Echo file name # For debugging
run: |
ls *.nupkg