forked from NickStrupat/CacheLineSize.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.62 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
name: CD
on:
push:
branches: master
pull_request:
branches: master
env:
TOKEN: ${{ secrets.TOKEN }}
NUGETTOKEN: ${{ secrets.NUGETTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
testAndDeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Test
run: dotnet test -c Release -f netcoreapp3.0
- name: Generate PDF with code
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
bash ./generate-pdf.sh
- name: Publish documentation to gh-pages branch
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
bash ./publish-docs.sh
- name: Publish NuGet package
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
bash ./push-nuget.sh
- name: Publish release
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
bash ./publish-release.sh
pushNuGetToGitHubPackageRegistry:
needs: testAndDeploy
if: github.event_name == 'push'
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: warrenbuckley/Setup-Nuget@v1
- name: Publish to GitHub Package Registry
run: |
dotnet pack -c Release
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }}
nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate