diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8c23067..eb80fbb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,10 @@ version: 2 updates: - - package-ecosystem: "nuget" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "nuget" + directory: "/" schedule: - interval: "weekly" + interval: "monthly" + commit-message: + include: scope + prefix: "fix: " diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index bf8f455..eb8c3f2 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -11,24 +11,62 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Setup Git + uses: actions/checkout@v3 + with: + token : ${{ secrets.FIREBEND_GIT_PUSH_PAT}} + fetch-depth: 0 + + - name: Install Versionize + run: dotnet tool install --global Versionize + + - name: Setup git + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + + - name: Versionize Release + id: versionize + run: versionize --exit-insignificant-commits + continue-on-error: true + + - name: No release required + if: steps.versionize.outcome != 'success' + run: echo "Skipping publishing. No release required." - name: Setup .NET + if: steps.versionize.outcome != 'success' uses: actions/setup-dotnet@v1 with: dotnet-version: 8.0.101 - name: Restore dependencies + if: steps.versionize.outcome != 'success' run: dotnet restore json-patch-generator.sln - name: Build + if: steps.versionize.outcome != 'success' run: dotnet build json-patch-generator.sln --no-restore - name: Test + if: steps.versionize.outcome != 'success' run: dotnet test json-patch-generator.sln --no-build --verbosity normal - name: Pack + if: steps.versionize.outcome != 'success' run : dotnet pack **/*/JsonPatchGenerator.csproj --configuration Release -o out/pack - name: Publish + if: steps.versionize.outcome != 'success' run: dotnet nuget push ./out/pack/*.nupkg --api-key ${{secrets.FIREBEND_NUGET_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json + + - name: Push version changes + if: steps.versionize.outcome == 'success' + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.FIREBEND_GIT_PUSH_PAT }} + branch: main + tags: true + force: true + unprotect_reviews: true + sleep: 5 diff --git a/.versionize b/.versionize new file mode 100644 index 0000000..77fa5f2 --- /dev/null +++ b/.versionize @@ -0,0 +1,23 @@ +{ + "changelog": { + "header": "Lit Redis Changelog", + "includeAllCommits": true, + "sections": [ + { + "type": "feat", + "section": "✨ Features", + "hidden": false + }, + { + "type": "fix", + "section": "🐛 Bug Fixes", + "hidden": true + }, + { + "type": "perf", + "section": "🚀 Performance", + "hidden": false + } + ] + } +} diff --git a/src/JsonPatchGenerator/JsonPatchGenerator.csproj b/src/JsonPatchGenerator/JsonPatchGenerator.csproj index eb1c8b3..f980f93 100644 --- a/src/JsonPatchGenerator/JsonPatchGenerator.csproj +++ b/src/JsonPatchGenerator/JsonPatchGenerator.csproj @@ -6,6 +6,7 @@ Firebend.JsonPatchGenerator Firebend.JsonPatch default + 1