Skip to content
Merged
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
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CodeQL"

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

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: csharp
build-mode: none

steps:
- uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This runs when a tag gets pushed matching the format below
name: Release

on:
Expand All @@ -12,7 +11,11 @@ env:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

runs-on: windows-latest

steps:
- uses: actions/checkout@v5
Expand All @@ -23,6 +26,7 @@ jobs:
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
cache-dependency-path: '**/packages.lock.json'

- name: Restore
run: dotnet restore
Expand All @@ -31,16 +35,16 @@ jobs:
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal

- name: Pack
run: dotnet pack --configuration Release -p:PackageVersion=${{ github.ref_name }} --output artifacts/
run: dotnet pack --no-build --no-restore --configuration Release -p:PackageVersion=${{ github.ref_name }} --output artifacts/

- name: Publish to GitHub
working-directory: artifacts
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/scientistproject/index.json"
dotnet nuget push --source github *.nupkg
dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source github

- name: Publish to NuGet
working-directory: artifacts
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Unit test

on:
pull_request:
branches: ["master"]

env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

jobs:
test:
permissions:
contents: read

strategy:
fail-fast: false
matrix:
include:
- framework: net8.0
sdk: 8.0.x
os: ubuntu-latest
- framework: net48
sdk: none
os: windows-latest

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v5

- name: Setup .NET (skip for net48)
if: matrix.sdk != 'none'
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.sdk }}
cache-dependency-path: '**/packages.lock.json'

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-build --no-restore --framework ${{ matrix.framework }} --configuration Release --verbosity normal
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
Expand Down
Loading