Skip to content

Commit 15994c5

Browse files
committed
Initial trivial commit
0 parents  commit 15994c5

File tree

5 files changed

+469
-0
lines changed

5 files changed

+469
-0
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Top-most EditorConfig file.
2+
root = true
3+
4+
# Section for C# files
5+
# All rules below apply only to .cs files
6+
[*.cs]
7+
8+
#### Core EditorConfig Options ####
9+
10+
# Indentation and spacing
11+
indent_style = space
12+
indent_size = 4
13+
14+
# New line preferences
15+
end_of_line = crlf
16+
insert_final_newline = true
17+
trim_trailing_whitespace = true
18+
19+
# Charset preference
20+
charset = utf-8

.github/workflows/ci.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: dotnet package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
permissions:
12+
contents: read
13+
actions: read
14+
checks: write
15+
runs-on: ubuntu-latest
16+
strategy:
17+
max-parallel: 1
18+
matrix:
19+
dotnet-version: ["6.x", "5.x"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Setup dotnet
24+
uses: actions/setup-dotnet@v3
25+
with:
26+
dotnet-version: ${{ matrix.dotnet-version }}
27+
- name: Install dependencies
28+
run: dotnet restore --locked-mode
29+
- name: Build with dotnet
30+
run: dotnet build --no-restore --configuration Release
31+
- name: Test with dotnet
32+
timeout-minutes: 5
33+
env:
34+
AppSettings__ProjectId: ${{ secrets.DOTNET_PROJECT_ID }}
35+
AppSettings__ManagementKey: ${{ secrets.DOTNET_MANAGEMENT_KEY }}
36+
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"
37+
38+
- name: Upload dotnet test results
39+
if: always()
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: dotnet-results-${{ matrix.dotnet-version }}
43+
path: TestResults-${{ matrix.dotnet-version }}
44+
- name: Post test results to GitHub
45+
uses: dorny/test-reporter@v1
46+
if: always()
47+
with:
48+
name: .NET Tests
49+
path: TestResults-${{ matrix.dotnet-version }}/*.trx
50+
reporter: dotnet-trx

.github/workflows/release.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload dotnet package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
env:
8+
PACKAGE_NAME: Descope
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: "6.0.x" # SDK Version to use.
21+
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
22+
env:
23+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
24+
- run: dotnet build --configuration Release ${{ env.PACKAGE_NAME }}
25+
- name: Create the package
26+
run: dotnet pack --configuration Release ${{ env.PACKAGE_NAME }}
27+
- name: Publish the package to GPR
28+
run: dotnet nuget push ${{ env.PACKAGE_NAME }}/bin/Release/*.nupkg

0 commit comments

Comments
 (0)