|
7 | 7 | branches: master |
8 | 8 |
|
9 | 9 | env: |
10 | | - TOKEN: ${{ secrets.TOKEN }} |
11 | 10 | NUGETTOKEN: ${{ secrets.NUGETTOKEN }} |
12 | 11 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
13 | | - SCRIPTS_BASE_URL: https://raw.githubusercontent.com/linksplatform/Scripts/master/SingleProjectRepository |
| 12 | + SCRIPTS_BASE_URL: https://raw.githubusercontent.com/linksplatform/Scripts/master/MultiProjectRepository |
14 | 13 |
|
15 | 14 | jobs: |
16 | | - buildAndDeploy: |
| 15 | + testAndDeploy: |
17 | 16 | runs-on: ubuntu-latest |
18 | 17 | steps: |
19 | 18 | - uses: actions/checkout@v1 |
20 | | - - name: Build |
21 | | - run: dotnet build -c Release |
22 | | - - name: Generate PDF with code |
| 19 | + with: |
| 20 | + submodules: true |
| 21 | + - name: Test |
| 22 | + run: dotnet test -c Release -f netcoreapp3.0 |
| 23 | + - name: Generate PDF with CSharp code |
23 | 24 | if: github.event_name == 'push' |
24 | 25 | run: | |
25 | 26 | export REPOSITORY_NAME=$(basename ${{ github.repository }}) |
26 | 27 | wget "$SCRIPTS_BASE_URL/format-csharp-files.py" |
27 | | - wget "$SCRIPTS_BASE_URL/format-document.sh" |
28 | | - wget "$SCRIPTS_BASE_URL/generate-pdf.sh" |
29 | | - bash ./generate-pdf.sh |
30 | | - - name: Publish documentation to gh-pages branch |
| 28 | + wget "$SCRIPTS_BASE_URL/format-csharp-document.sh" |
| 29 | + wget "$SCRIPTS_BASE_URL/generate-csharp-pdf.sh" |
| 30 | + bash ./generate-csharp-pdf.sh |
| 31 | + - name: Publish CSharp documentation to gh-pages branch |
31 | 32 | if: github.event_name == 'push' |
32 | 33 | run: | |
33 | 34 | export REPOSITORY_NAME=$(basename ${{ github.repository }}) |
34 | 35 | wget "$SCRIPTS_BASE_URL/docfx.json" |
| 36 | + wget "$SCRIPTS_BASE_URL/filter.yml" |
35 | 37 | wget "$SCRIPTS_BASE_URL/toc.yml" |
36 | | - wget "$SCRIPTS_BASE_URL/publish-docs.sh" |
37 | | - bash ./publish-docs.sh |
38 | | - - name: Publish NuGet package |
| 38 | + wget "$SCRIPTS_BASE_URL/publish-csharp-docs.sh" |
| 39 | + bash ./publish-csharp-docs.sh |
| 40 | + - name: Publish CSharp NuGet package |
39 | 41 | if: github.event_name == 'push' |
40 | 42 | run: | |
41 | 43 | export REPOSITORY_NAME=$(basename ${{ github.repository }}) |
42 | | - wget "$SCRIPTS_BASE_URL/push-nuget.sh" |
43 | | - bash ./push-nuget.sh |
| 44 | + wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh" |
| 45 | + bash ./push-csharp-nuget.sh |
44 | 46 | - name: Publish release |
45 | 47 | if: github.event_name == 'push' |
46 | 48 | run: | |
47 | 49 | export REPOSITORY_NAME=$(basename ${{ github.repository }}) |
48 | 50 | wget "$SCRIPTS_BASE_URL/publish-release.sh" |
49 | 51 | bash ./publish-release.sh |
50 | 52 |
|
51 | | - pushNuGetToGitHubPackageRegistry: |
52 | | - needs: buildAndDeploy |
| 53 | + pushCSharpNuGetToGitHubPackageRegistry: |
| 54 | + needs: testAndDeploy |
53 | 55 | if: github.event_name == 'push' |
54 | 56 | runs-on: windows-latest |
55 | 57 | steps: |
56 | 58 | - uses: actions/checkout@v1 |
| 59 | + with: |
| 60 | + submodules: true |
57 | 61 | - uses: warrenbuckley/Setup-Nuget@v1 |
58 | | - - name: Publish to GitHub Package Registry |
| 62 | + - name: Publish CSharp NuGet to GitHub Package Registry |
59 | 63 | run: | |
| 64 | + dotnet build -c Release |
60 | 65 | dotnet pack -c Release |
61 | 66 | nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }} |
62 | 67 | nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate |
0 commit comments