diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 619d107..b8203ee 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,14 +1,18 @@ version: 2 updates: -- package-ecosystem: nuget +- package-ecosystem: github-actions directory: "/" schedule: interval: daily - time: "03:42" open-pull-requests-limit: 10 -- package-ecosystem: github-actions + ignore: + - dependency-name: "*" + # GitHub actions are using git tags (v1 = v1.2 = v1.2.3) which should be compatible until a major change is performed + update-types: + - "version-update:semver-minor" + - "version-update:semver-patch" +- package-ecosystem: nuget directory: "/" schedule: interval: daily - time: "03:42" open-pull-requests-limit: 10 diff --git a/.github/workflows/buildNuget.yml b/.github/workflows/buildNuget.yml index 2531338..761ea86 100644 --- a/.github/workflows/buildNuget.yml +++ b/.github/workflows/buildNuget.yml @@ -23,7 +23,7 @@ jobs: id: versionprovider shell: bash run: | - echo "::set-output name=version::$(date -u +%Y.%m.%d.%k%M)" + echo "version=$(date -u +%Y.%m.%d.%k%M)" >> $GITHUB_OUTPUT build_each: runs-on: ubuntu-latest @@ -40,13 +40,13 @@ jobs: - "CoreFramework.CrashLogging" - "CoreFramework.Logging" dotnet-version: - - 3.1.x + - 6.x steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet-version }} @@ -58,10 +58,10 @@ jobs: - name: Find nupkg file id: nupkgvar working-directory: src/${{ matrix.project }}/bin/Release - run: files=( *.nupkg) && echo ::set-output name=filename::$(echo "${files[0]}") + run: files=( *.nupkg) && echo "filename=${files[0]}" >> $GITHUB_OUTPUT - name: Upload nupkg - Upload asset - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.dotnet-version }}-${{ steps.nupkgvar.outputs.filename }} path: src/${{ matrix.project }}/bin/Release/${{ steps.nupkgvar.outputs.filename }} @@ -69,10 +69,10 @@ jobs: - name: Find snupkg file id: snupkgvar working-directory: src/${{ matrix.project }}/bin/Release - run: files=( *.snupkg) && echo ::set-output name=filename::$(echo "${files[0]}") + run: files=( *.snupkg) && echo "filename=${files[0]}" >> $GITHUB_OUTPUT - name: Upload snupkg - Upload asset - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.dotnet-version }}-${{ steps.snupkgvar.outputs.filename }} path: src/${{ matrix.project }}/bin/Release/${{ steps.snupkgvar.outputs.filename }} diff --git a/.github/workflows/checkBuild.yml b/.github/workflows/checkBuild.yml index 11b10a2..d6c2b52 100644 --- a/.github/workflows/checkBuild.yml +++ b/.github/workflows/checkBuild.yml @@ -18,14 +18,14 @@ jobs: fail-fast: true matrix: dotnet-version: - - 3.1.x - - 5.0.x + - 6.x + - 7.x steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d03650..27f7a15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: 3.1.x + dotnet-version: 6.x - name: Build run: dotnet build --configuration Release @@ -35,8 +35,7 @@ jobs: # The maximum value for either of the parts is 65534 - https://stackoverflow.com/a/37941296/11649486 run: | gen_version=$(date -u +%Y.%m.%d.%k%M) - echo "version=$gen_version" - echo "::set-output name=version::$gen_version" + echo "version=$gen_version" >> $GITHUB_OUTPUT echo "${{github.ref}}" if [ "${{github.ref}}" = "refs/heads/master-release-test" ]; then @@ -45,8 +44,7 @@ jobs: gen_package_version="${gen_version}" fi - echo "packageversion=$gen_package_version" - echo "::set-output name=packageversion::$gen_package_version" + echo "packageversion=$gen_package_version" >> $GITHUB_OUTPUT generate_release: runs-on: ubuntu-latest @@ -66,12 +64,10 @@ jobs: prerelease=false fi - echo "prerelease=$prerelease" - echo "::set-output name=prerelease::$prerelease" - echo "draft=$draft" - echo "::set-output name=draft::$draft" + echo "prerelease=$prerelease" >> $GITHUB_OUTPUT + echo "draft=$draft" >> $GITHUB_OUTPUT - - name: Create Release (draft) + - name: Create Release id: create_draft uses: actions/create-release@v1 env: @@ -108,12 +104,12 @@ jobs: - "CoreFramework.Logging" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: 3.1.x + dotnet-version: 6.x - name: Pack working-directory: src/${{ matrix.project }} @@ -123,10 +119,10 @@ jobs: - name: Find nupkg file id: nupkgvar working-directory: src/${{ matrix.project }}/bin/Release - run: files=( *.nupkg) && echo ::set-output name=filename::$(echo "${files[0]}") + run: files=( *.nupkg) && echo "filename=${files[0]}" >> $GITHUB_OUTPUT - name: Upload nupkg - Upload asset - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ steps.nupkgvar.outputs.filename }} path: src/${{ matrix.project }}/bin/Release/${{ steps.nupkgvar.outputs.filename }} @@ -134,10 +130,10 @@ jobs: - name: Find snupkg file id: snupkgvar working-directory: src/${{ matrix.project }}/bin/Release - run: files=( *.snupkg) && echo ::set-output name=filename::$(echo "${files[0]}") + run: files=( *.snupkg) && echo "filename=${files[0]}" >> $GITHUB_OUTPUT - name: Upload snupkg - Upload asset - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ steps.snupkgvar.outputs.filename }} path: src/${{ matrix.project }}/bin/Release/${{ steps.snupkgvar.outputs.filename }} diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 0000000..10dd0cb --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,66 @@ +name: Sonar CI + +on: + workflow_dispatch: + push: + branches: [ master, develop ] + paths-ignore: + - '**.md' + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: + - '**.md' + +jobs: + sonar: + name: SonarCloud Scan + runs-on: windows-latest + steps: + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11.x + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.x + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Cache SonarCloud packages + uses: actions/cache@v3 + with: + path: ~\sonar\cache + key: ${{ runner.os }}-sonar-fix2 + restore-keys: ${{ runner.os }}-sonar-fix2 + + - name: Cache SonarCloud scanner + id: cache-sonar-scanner + uses: actions/cache@v3 + with: + path: .\src\.sonar\scanner + key: ${{ runner.os }}-sonar-scanner-fix2 + restore-keys: ${{ runner.os }}-sonar-scanner-fix2 + + - name: Install SonarCloud scanner + if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' + working-directory: src + shell: powershell + run: | + New-Item -Path .\.sonar\scanner -ItemType Directory + dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner + + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + working-directory: src + shell: powershell + run: | + .\.sonar\scanner\dotnet-sonarscanner begin /k:"litetex_CoreFrameworkBase" /o:"litetex" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" + dotnet build --configuration Release + .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" diff --git a/.gitignore b/.gitignore index dfcfd56..b86ae41 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,7 @@ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ -# .NET Core +# .NET project.lock.json project.fragment.lock.json artifacts/ diff --git a/LICENSE b/LICENSE index 53c7613..0752986 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 litetex +Copyright (c) 2022 litetex Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0438350..d31b1fa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # CoreFramework [![Latest Version](https://img.shields.io/github/v/release/litetex/CoreFramework?style=flat-square)](https://github.com/litetex/CoreFramework/releases) +_Current state: Maintenance mode_ + Stuff that is frequently used in (my) code and therefore here summarized +
Module | @@ -55,10 +58,7 @@ Stuff that is frequently used in (my) code and therefore here summarized- Config.Net.Json - - - + Config.Net#JSON |
---|