Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 54 additions & 37 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- name: Publish NuGet package to GitHub Package Registry
run: |
dotnet build -c Release
dotnet pack -c Release
dotnet nuget add source https://nuget.pkg.github.com/linksplatform/index.json --name GitHub --username linksplatform --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet nuget push **/*.nupkg --source GitHub --skip-duplicate
- name: Build project
run: dotnet build -c Release
- name: Pack project
run: dotnet pack -c Release
- name: Add GitHub NuGet source
run: dotnet nuget add source https://nuget.pkg.github.com/linksplatform/index.json --name GitHub --username linksplatform --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Push NuGet package to GitHub Package Registry
run: dotnet nuget push **/*.nupkg --source GitHub --skip-duplicate
pusnToNuget:
runs-on: ubuntu-latest
needs: test
Expand All @@ -60,16 +62,18 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- name: Set repository name
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download project information script
run: wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
- name: Read project information
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
bash ./read_csharp_package_info.sh
run: bash ./read_csharp_package_info.sh
- name: Set repository name for publishing
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download NuGet publishing script
run: wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh"
- name: Publish NuGet package
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh"
bash ./push-csharp-nuget.sh
run: bash ./push-csharp-nuget.sh
publiseRelease:
runs-on: ubuntu-latest
needs: test
Expand All @@ -82,19 +86,25 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- name: Set repository name for release
if: ${{ github.event_name == 'push' }}
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download project information script for release
if: ${{ github.event_name == 'push' }}
run: wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
- name: Read project information
if: ${{ github.event_name == 'push' }}
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
bash ./read_csharp_package_info.sh
run: bash ./read_csharp_package_info.sh
- name: Set repository name for release publishing
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download release script
run: wget "$SCRIPTS_BASE_URL/publish-release.sh"
- name: Make release script executable
run: chmod +x ./publish-release.sh
- name: Download C# release script
run: wget "$SCRIPTS_BASE_URL/publish-csharp-release.sh"
- name: Publish release
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/publish-release.sh"
chmod +x ./publish-release.sh
wget "$SCRIPTS_BASE_URL/publish-csharp-release.sh"
bash ./publish-csharp-release.sh
run: bash ./publish-csharp-release.sh
findChangedCsFiles:
runs-on: ubuntu-latest
needs: test
Expand Down Expand Up @@ -139,13 +149,16 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- name: Set repository name for PDF generation
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download Python formatting script
run: wget "$SCRIPTS_BASE_URL/format-csharp-files.py"
- name: Download document formatting script
run: wget "$SCRIPTS_BASE_URL/format-csharp-document.sh"
- name: Download PDF generation script
run: wget "$SCRIPTS_BASE_URL/generate-csharp-pdf.sh"
- name: Generate PDF with code
run: |
export REPOSITORY_NAME=$(basename ${{ github.repository }})
wget "$SCRIPTS_BASE_URL/format-csharp-files.py"
wget "$SCRIPTS_BASE_URL/format-csharp-document.sh"
wget "$SCRIPTS_BASE_URL/generate-csharp-pdf.sh"
bash ./generate-csharp-pdf.sh
run: bash ./generate-csharp-pdf.sh
publishDocumentation:
runs-on: ubuntu-latest
needs: [findChangedCsFiles]
Expand All @@ -159,11 +172,15 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true
- name: Set repository name for documentation
run: export REPOSITORY_NAME=$(basename ${{ github.repository }})
- name: Download DocFX configuration
run: wget "$SCRIPTS_BASE_URL/docfx.json"
- name: Download filter configuration
run: wget "$SCRIPTS_BASE_URL/filter.yml"
- name: Download table of contents configuration
run: wget "$SCRIPTS_BASE_URL/toc.yml"
- name: Download documentation publishing script
run: wget "$SCRIPTS_BASE_URL/publish-csharp-docs.sh"
- name: Publish documentation to gh-pages branch
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-csharp-docs.sh"
bash ./publish-csharp-docs.sh
run: bash ./publish-csharp-docs.sh
Loading