-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from dotnetprojects/develop
Changing the build and deploy process
- Loading branch information
Showing
43 changed files
with
1,191 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: false | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET 8.0 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ./Source/SVGImage/DotNetProjects.SVGImage.csproj | ||
|
||
- name: GitVersion | ||
id: gitversion # step id used as reference for output values | ||
uses: roryprimrose/set-vs-sdk-project-version@v1.0.6 | ||
with: | ||
projectFilter: './Source/SVGImage/*.SVGImage.csproj' | ||
version: '5.0.118' | ||
|
||
- name: Update project version | ||
uses: roryprimrose/set-vs-sdk-project-version@v1.0.6 | ||
with: | ||
projectFilter: './Source/SVGImage/*.SVGImage.csproj' | ||
version: '5.0.118' | ||
# version: ${{ steps.gitversion.outputs.NuGetVersionV2 }} | ||
assemblyVersion: ${{ steps.gitversion.outputs.AssemblySemVer }} | ||
fileVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }} | ||
informationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }} | ||
|
||
- name: Build, Test, Pack, Publish | ||
shell: bash | ||
run: | | ||
dotnet tool install -g dotnet-releaser | ||
dotnet-releaser run --nuget-token "${{secrets.NUGET_API_KEY}}" --github-token "${{secrets.GITHUB_TOKEN}}" Source/dotnet-releaser.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
# Your GitHub workflow file under .github/workflows/ | ||
name: DocFX | ||
|
||
# Trigger the action on push to master | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
publish-docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Dotnet Setup | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.x | ||
dotnet-version: 8.x | ||
|
||
- run: dotnet tool update -g docfx | ||
- run: docfx Docs/docfx.json | ||
|
||
- name: Upload DocFX packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docfx_site | ||
path: ${{ github.workspace }}/Docs/_site | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: Docs/_site | ||
# Upload entire repository | ||
path: 'Docs/_site' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.