diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dbd8637..69f27e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,8 +6,10 @@ jobs: runs-on: ubuntu-latest environment: deploy name: deploy + permissions: + contents: write env: - gh_token: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 - name: jdk 11 @@ -17,5 +19,9 @@ jobs: distribution: 'temurin' - name: gradle caching uses: gradle/gradle-build-action@v2 + - run: git fetch origin main - name: publish all - run: ./gradlew changelogPush -Prelease=true -Penable_publishing=true --stacktrace --warning-mode all \ No newline at end of file + run: ./gradlew changelogPush -Prelease=true -Penable_publishing=true --stacktrace --warning-mode all + - run: git checkout main + - run: git merge release --ff-only + - run: git push origin main \ No newline at end of file diff --git a/README.md b/README.md index dcc4eef..543b3e0 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,11 @@ # Changelog ## [Unreleased] +### Changed +- **BREAKING** `spotlessChangelog` now creates GitHub releases by default ([#6](https://github.com/diffplug/blowdryer-diffplug/pull/6)) + - you need to update your `deploy.yml` + - if you set the `tagPrefix`, then you'll need to update the `runAfterPush` + - see PR above for details ## [7.3.0] - 2024-06-06 ### Added diff --git a/src/main/resources/base/changelog.gradle b/src/main/resources/base/changelog.gradle index 4011b8e..d783414 100644 --- a/src/main/resources/base/changelog.gradle +++ b/src/main/resources/base/changelog.gradle @@ -31,6 +31,8 @@ if (tasks.names.contains('changelogCheck')) { spotlessChangelog { branch 'release' appendDashSnapshotUnless_dashPrelease = true + tagMessage '{{changes}}' + runAfterPush "gh release create release/{{version}} --title 'v{{version}}' --notes-from-tag" } // set the project version for POM, jar manifest, etc. version = spotlessChangelog.versionNext