Skip to content

Update workflows #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
/**/packages/
/**/bin/
/**/obj/
_site
/_site
/api
1 change: 0 additions & 1 deletion .documentation/api/index.md

This file was deleted.

37 changes: 0 additions & 37 deletions .documentation/api/toc.yml

This file was deleted.

57 changes: 17 additions & 40 deletions .documentation/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,23 @@
{
"src": [
{
"files": "Core.csproj",
"exclude": [
"**/bin/**",
"**/obj/**"
],
"src": "../Core"
"src": "../Core",
"files": [
"**/*.csproj"
]
}
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
Expand All @@ -40,28 +30,15 @@
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"output": "_site",
"template": [
"default"
"default",
"modern"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
"globalMetadata": {
"_appName": "core-csharp",
"_appTitle": "core-csharp",
"_enableSearch": true
}
}
}
4 changes: 4 additions & 0 deletions .documentation/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
_layout: landing
---

# core-csharp
5 changes: 1 addition & 4 deletions .documentation/toc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
- name: Articles
href: articles/
- name: Api Documentation
- name: API
href: api/
homepage: api/index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Build And Test
name: Build and Test

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
buildAndTest:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: 8.x

- name: Install dependencies
- name: Restore dependencies
run: dotnet restore

- name: Build
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/build-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false

- uses: nikeee/docfx-action@v1.0.0
name: Build Documentation
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
args: .documentation/docfx.json
dotnet-version: 8.x

- name: Install docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx .documentation/docfx.json

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: .documentation/_site # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
folder: .documentation/_site
token: ${{ secrets.GITHUB_TOKEN }}
29 changes: 13 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
name: Publish Nuget Package
name: Publish NuGet Package

on:
push:
branches:
- release/* # Default release branch

jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: 8.x

- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.0.0
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.ref }}
check-name: "buildAndTest"
check-name: build-and-test
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

- name: Install dependencies
run: dotnet restore

- name: Build Core
run: dotnet build ./Core/Core.csproj --configuration Release --no-restore
- name: Generate package
run: dotnet pack ./Core/Core.csproj --configuration Release

# Publish
- name: publish on version change
run: nuget push "**/*.nupkg" -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

- name: Publish on version change
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}