-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
203 additions
and
0 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,84 @@ | ||
name: Build Commit | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/build-commit.yml" | ||
- "src/**" | ||
- "examples/**" | ||
- "*.sln" | ||
workflow_dispatch: | ||
|
||
env: | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 | ||
|
||
jobs: | ||
build-commit: | ||
name: Build Commit | ||
runs-on: ubuntu-latest | ||
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Build Project | ||
run: dotnet build | ||
package-commit: | ||
name: Package Commit | ||
runs-on: ubuntu-latest | ||
needs: build-commit | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Package Project | ||
run: | | ||
NIGHTLY=$(printf "%0*d" 5 ${{ github.run_number }}) | ||
dotnet pack -c Release -o build -p:Nightly=$NIGHTLY src/OoLunar.DSharpPlus.CommandAll.csproj | ||
dotnet nuget push "build/*" --skip-duplicate -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: DeepgramSharp-Nightly-${{ github.run_number }}.zip | ||
path: ./build/* | ||
document-commit: | ||
name: Document Commit | ||
runs-on: ubuntu-latest | ||
needs: package-commit | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Build Project | ||
run: | | ||
dotnet build | ||
dotnet tool update -g docfx --prerelease | ||
docfx docs/docfx.json | ||
- name: Upload GitHub Pages artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs/_site/ | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,43 @@ | ||
name: Build PR | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
paths: | ||
- ".github/workflows/build-pr.yml" | ||
- "src/**" | ||
- "examples/**" | ||
- "*.sln" | ||
env: | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 | ||
|
||
jobs: | ||
build-commit: | ||
name: "Build PR #${{ github.event.pull_request.number }}" | ||
runs-on: ubuntu-latest | ||
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Build Project | ||
run: dotnet build | ||
- name: Build and Package Project | ||
run: dotnet pack --include-symbols --include-source -o build -p:Nightly="PR-${{ github.event.pull_request.number }}" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: DeepgramSharp-PR-${{ github.event.pull_request.number }} | ||
path: ./build/* |
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,76 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: ["published"] | ||
|
||
env: | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 | ||
|
||
jobs: | ||
build-commit: | ||
name: Build Commit | ||
runs-on: ubuntu-latest | ||
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Build Project | ||
run: dotnet build | ||
package-commit: | ||
name: Package Commit | ||
runs-on: ubuntu-latest | ||
needs: build-commit | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Package Project | ||
run: | | ||
dotnet pack -c Release -o build | ||
dotnet nuget push "build/*" --skip-duplicate -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: DeepgramSharp.zip | ||
path: ./build/* | ||
document-commit: | ||
name: Document Commit | ||
runs-on: ubuntu-latest | ||
needs: package-commit | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8 | ||
- name: Build Project | ||
run: | | ||
dotnet build | ||
dotnet tool update -g docfx --prerelease | ||
docfx docs/docfx.json | ||
- name: Upload GitHub Pages artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs/_site/ | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |