1
0
mirror of https://github.com/XFox111/SimpleOTP.git synced 2026-04-22 08:00:45 +03:00

Major 2.0 (#20)

* New 2.0 version + DependencyInjection library

* Updated docs and repo settings (devcontainers, vscode, github, etc.)

* Added tests

* Fixed bugs

* Minor test project refactoring

* Updated projects
- Added symbol packages
- Updated package versions to pre-release

* Updated SECURITY.md

* Added GitHub Actions workflows
This commit is contained in:
2024-09-26 03:20:30 +03:00
committed by GitHub
parent 42f968171b
commit 1b989e7b35
87 changed files with 4076 additions and 2532 deletions
+51 -8
View File
@@ -1,10 +1,35 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
name: "CodeQL"
on:
push:
branches: [ master ]
branches: [ "main" ]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/*'
- '!.github/workflows/codeql-analysis.yml'
- '.vscode/*'
- '.devcontainer/*'
- '.assets/*'
pull_request:
branches: [ master ]
# The branches below must be a subset of the branches above
branches: [ "main" ]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/*'
- '!.github/workflows/codeql-analysis.yml'
- '.vscode/*'
- '.devcontainer/*'
- '.assets/*'
schedule:
- cron: '24 7 * * 3'
jobs:
analyze:
@@ -19,22 +44,40 @@ jobs:
fail-fast: false
matrix:
language: [ 'csharp' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3
# ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
+40
View File
@@ -0,0 +1,40 @@
name: "Build workflow"
on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
- "LICENSE"
- "PRIVACY"
- ".github/*"
- ".vscode/*"
- ".devcontainer/*"
- "!.github/workflows/pr-workflow.yml"
pull_request:
branches: [ "main" ]
paths-ignore:
- "**.md"
- "LICENSE"
- "PRIVACY"
- ".github/*"
- ".vscode/*"
- ".devcontainer/*"
- "!.github/workflows/pr-workflow.yml"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- run: dotnet restore
- run: dotnet build --no-restore
- run: dotnet test --no-restore --verbosity normal
+52
View File
@@ -0,0 +1,52 @@
name: "Release workflow"
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- run: dotnet restore
- run: dotnet pack
- name: Drop artifacts
uses: actions/upload-artifact@main
with:
name: packages
path: libraries/**/Release/EugeneFox.SimpleOTP*.?nupkg
publish-nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@main
with:
name: packages
- name: Publish NuGet and symbols
uses: edumserrano/nuget-push@v1.2.2
with:
api-key: ${{ secrets.NUGET_API_KEY }}
working-directory: .
publish-github:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@main
with:
name: packages
- name: dotnet nuget push
run: dotnet nuget push *.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/xfox111/index.json --skip-duplicate --no-symbols