Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/linksplatform/Random
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Feb 22, 2020
2 parents fc5a880 + 33f2f91 commit 3182e7c
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,61 @@ on:
branches: master

env:
TOKEN: ${{ secrets.TOKEN }}
NUGETTOKEN: ${{ secrets.NUGETTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCRIPTS_BASE_URL: https://raw.githubusercontent.com/linksplatform/Scripts/master/SingleProjectRepository
SCRIPTS_BASE_URL: https://raw.githubusercontent.com/linksplatform/Scripts/master/MultiProjectRepository

jobs:
buildAndDeploy:
testAndDeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build
run: dotnet build -c Release
- name: Generate PDF with code
with:
submodules: true
- name: Test
run: dotnet test -c Release -f netcoreapp3.0
- name: Generate PDF with CSharp code
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/format-csharp-files.py"
wget "$SCRIPTS_BASE_URL/format-document.sh"
wget "$SCRIPTS_BASE_URL/generate-pdf.sh"
bash ./generate-pdf.sh
- name: Publish documentation to gh-pages branch
wget "$SCRIPTS_BASE_URL/format-csharp-document.sh"
wget "$SCRIPTS_BASE_URL/generate-csharp-pdf.sh"
bash ./generate-csharp-pdf.sh
- name: Publish CSharp documentation to gh-pages branch
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/docfx.json"
wget "$SCRIPTS_BASE_URL/filter.yml"
wget "$SCRIPTS_BASE_URL/toc.yml"
wget "$SCRIPTS_BASE_URL/publish-docs.sh"
bash ./publish-docs.sh
- name: Publish NuGet package
wget "$SCRIPTS_BASE_URL/publish-csharp-docs.sh"
bash ./publish-csharp-docs.sh
- name: Publish CSharp NuGet package
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/push-nuget.sh"
bash ./push-nuget.sh
wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh"
bash ./push-csharp-nuget.sh
- name: Publish release
if: github.event_name == 'push'
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/publish-release.sh"
bash ./publish-release.sh
pushNuGetToGitHubPackageRegistry:
needs: buildAndDeploy
pushCSharpNuGetToGitHubPackageRegistry:
needs: testAndDeploy
if: github.event_name == 'push'
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: warrenbuckley/Setup-Nuget@v1
- name: Publish to GitHub Package Registry
- name: Publish CSharp NuGet to GitHub Package Registry
run: |
dotnet build -c Release
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

0 comments on commit 3182e7c

Please sign in to comment.