Skip to content

Commit

Permalink
Initial trivial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
itaihanski committed Mar 3, 2024
0 parents commit 25a11c0
Show file tree
Hide file tree
Showing 5 changed files with 469 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
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
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
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
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
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
Loading

0 comments on commit 25a11c0

Please sign in to comment.