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
-33
View File
@@ -1,33 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
### Description
A clear and concise description of what the bug is.
### Reproduction steps
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots to help explain your problem.
### Environment
Please complete the following information:
- Platform: [e.g. Xamarin.Forms 5]
- OS: [e.g. Windows 10 1909 (10.0.18363)]
- Package version: [e.g. 1.1]
### Additional context
Add any other context about the problem here.
+107
View File
@@ -0,0 +1,107 @@
name: "🐞 Bug Report"
description: Create a report to help us improve the library
title: "[Bug]: "
labels: ["bug", "needs-triage"]
assignees:
- xfox111
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: desc
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: e.g. OtpSecret.CreateNew() creates an empty secret
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: e.g. OtpSecret.CreateNew() should create non-empty secret with length of 32 characters when stringified, and a byte array of length 20 with non-zero values
validations:
required: true
- type: input
attributes:
label: Minimal repoduction environment
description: Provide a link to source code or online editor with minimal reproduction enviornment that showcases the issue
validations:
required: true
- type: dropdown
id: dotnet-version
attributes:
label: .NET version of your project
options:
- ".NET 8"
- ".NET Preview"
- "Other"
validations:
required: true
- type: dropdown
id: type
attributes:
label: Project type
options:
- "Console"
- "Class library"
- "Web API (ASP.NET)"
- ".NET MAUI"
- "Other"
validations:
required: true
- type: dropdown
id: package
attributes:
label: Affected packages
options:
- "SimpleOTP"
- "SimpleOTP.DependencyInjection"
- "Both"
validations:
required: true
- type: input
id: version
attributes:
label: Package version
placeholder: e.g. 8.0.0
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
- type: dropdown
id: requested-help
attributes:
label: Are you willing to submit a PR for this issue?
options:
- "yes"
- "no"
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
required: true
- label: The provided reproduction is a minimal reproducible example of the bug.
required: true
+7
View File
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-config.json
blank_issues_enabled: true
contact_links:
- name: Questions & Discussions
url: https://github.com/XFox111/SimpleOTP/discussions
about: Use GitHub discussions for message-board style questions and discussions.
-20
View File
@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
@@ -0,0 +1,62 @@
name: "🚀 New feature proposal"
description: Suggest a feature idea for this project
title: "[Feature]: "
labels: ["feature", "needs-triage"]
assignees:
- xfox111
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: proposition
attributes:
label: Proposed solution
description: Describe the solution you'd like
validations:
required: true
- type: textarea
id: justification
attributes:
label: Justification
description: Is your feature request related to a problem? Please describe.
validations:
required: true
- type: textarea
id: alts
attributes:
label: Alternatives
description: Describe alternatives you've considered.
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: dropdown
id: requested-help
attributes:
label: Are you willing to submit a PR for this issue?
options:
- "yes"
- "no"
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
+42
View File
@@ -0,0 +1,42 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
assignees:
- "xfox111"
reviewers:
- "xfox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
- package-ecosystem: "github-actions"
directory: "/"
assignees:
- "xfox111"
reviewers:
- "xfox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
- package-ecosystem: "devcontainers"
directory: "/"
assignees:
- "xfox111"
reviewers:
- "xfox111"
schedule:
interval: monthly
rebase-strategy: disabled
open-pull-requests-limit: 20
+9 -8
View File
@@ -1,10 +1,11 @@
Fixes:
## Description
<!--Put short description of the pull request here-->
## Changelog
- Item 1
- Item 2
- Item 3
### Changelog
<!-- - e.g. Updated `PackageVersion` from `1.0.0` to `1.1.0` -->
## PR Checklist
- [ ] Update package version and release notes
- [ ] Tests and documentation
Resolves: #issue_number
<!-- IMPORTANT -->
<!-- Before submitting a pull request, make sure, that there's an issue related to it, and that you are assigned. -->
<!-- Visit https://github.com/xfox111/SimpleOTP/blob/main/CONTRIBUTING.md for more information. -->
+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