-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 25a11c0
Showing
5 changed files
with
469 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,20 @@ | ||
# Top-most EditorConfig file. | ||
root = true | ||
|
||
# Section for C# files | ||
# All rules below apply only to .cs files | ||
[*.cs] | ||
|
||
#### Core EditorConfig Options #### | ||
|
||
# Indentation and spacing | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# New line preferences | ||
end_of_line = crlf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Charset preference | ||
charset = utf-8 |
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,50 @@ | ||
name: dotnet package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
permissions: | ||
contents: read | ||
actions: read | ||
checks: write | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
dotnet-version: ["6.x", "5.x"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
- name: Install dependencies | ||
run: dotnet restore --locked-mode | ||
- name: Build with dotnet | ||
run: dotnet build --no-restore --configuration Release | ||
- name: Test with dotnet | ||
timeout-minutes: 5 | ||
env: | ||
AppSettings__ProjectId: ${{ secrets.DOT_NET_PROJECT_ID }} | ||
AppSettings__ManagementKey: ${{ secrets.DOT_NET_MANAGEMENT_KEY_ID }} | ||
run: dotnet test --no-build --configuration Release --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" --blame --blame-hang --blame-hang-timeout 1min --diag "TestResults-${{ matrix.dotnet-version }}/vstest_diagnostics.log" | ||
|
||
- name: Upload dotnet test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dotnet-results-${{ matrix.dotnet-version }} | ||
path: TestResults-${{ matrix.dotnet-version }} | ||
- name: Post test results to GitHub | ||
uses: dorny/test-reporter@v1 | ||
if: always() | ||
with: | ||
name: .NET Tests | ||
path: TestResults-${{ matrix.dotnet-version }}/*.trx | ||
reporter: dotnet-trx |
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,28 @@ | ||
name: Upload dotnet package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
env: | ||
PACKAGE_NAME: Descope | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "6.0.x" # SDK Version to use. | ||
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- run: dotnet build --configuration Release ${{ env.PACKAGE_NAME }} | ||
- name: Create the package | ||
run: dotnet pack --configuration Release ${{ env.PACKAGE_NAME }} | ||
- name: Publish the package to GPR | ||
run: dotnet nuget push ${{ env.PACKAGE_NAME }}/bin/Release/*.nupkg |
Oops, something went wrong.