Skip to content

Commit

Permalink
feat(project): update to latest best practices, support sbyte and byte
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasSchubert committed Feb 21, 2024
1 parent 0e3a760 commit 6902daa
Show file tree
Hide file tree
Showing 72 changed files with 5,137 additions and 1,479 deletions.
24 changes: 24 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-outdated-tool": {
"version": "4.6.0",
"commands": [
"dotnet-outdated"
]
},
"dotnet-reportgenerator-globaltool": {
"version": "5.2.1",
"commands": [
"reportgenerator"
]
},
"roslynator.dotnet.cli": {
"version": "0.8.3",
"commands": [
"roslynator"
]
}
}
}
365 changes: 365 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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

version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Inspired by https://www.jamescroft.co.uk/how-to-build-publish-nuget-packages-with-github-actions/
name: Publish
on:
push:
tags:
- '*'
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Restore
run: dotnet restore
- name: Build Release
run: dotnet build -tl -c Release
- name: Pack
run: dotnet pack --configuration Release
- name: Publish Nuget Package
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source 'https://api.nuget.org/v3/index.json'
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Inspired by https://github.com/semantic-release/github/blob/master/.github/workflows/release.yml
name: Release
on:
push:
branches:
- main

permissions:
contents: read

jobs:
quality:
name: quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Restore
run: dotnet restore
- name: Unit Tests
run: dotnet test
- name: Build Release
run: dotnet build -tl -c Release
release:
needs: quality
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: lts/*
- run: npm ci
- run: npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/github @semantic-release/npm @semantic-release/git semantic-release-replace-plugin semantic-release-presets
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
TEAMS_WEBHOOK_DISABLED: true
Loading

0 comments on commit 6902daa

Please sign in to comment.