Skip to content

Commit 793dfb0

Browse files
authored
Add GitHub releases (#6)
2 parents 2596951 + 0099585 commit 793dfb0

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.github/workflows/deploy.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ jobs:
66
runs-on: ubuntu-latest
77
environment: deploy
88
name: deploy
9+
permissions:
10+
contents: write
911
env:
10-
gh_token: ${{ secrets.GH_TOKEN }}
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1113
steps:
1214
- uses: actions/checkout@v3
1315
- name: jdk 11
@@ -17,5 +19,9 @@ jobs:
1719
distribution: 'temurin'
1820
- name: gradle caching
1921
uses: gradle/gradle-build-action@v2
22+
- run: git fetch origin main
2023
- name: publish all
21-
run: ./gradlew changelogPush -Prelease=true -Penable_publishing=true --stacktrace --warning-mode all
24+
run: ./gradlew changelogPush -Prelease=true -Penable_publishing=true --stacktrace --warning-mode all
25+
- run: git checkout main
26+
- run: git merge release --ff-only
27+
- run: git push origin main

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878

7979
# Changelog
8080
## [Unreleased]
81+
### Changed
82+
- **BREAKING** `spotlessChangelog` now creates GitHub releases by default ([#6](https://github.com/diffplug/blowdryer-diffplug/pull/6))
83+
- you need to update your `deploy.yml`
84+
- if you set the `tagPrefix`, then you'll need to update the `runAfterPush`
85+
- see PR above for details
8186

8287
## [7.3.0] - 2024-06-06
8388
### Added

src/main/resources/base/changelog.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ if (tasks.names.contains('changelogCheck')) {
3131
spotlessChangelog {
3232
branch 'release'
3333
appendDashSnapshotUnless_dashPrelease = true
34+
tagMessage '{{changes}}'
35+
runAfterPush "gh release create release/{{version}} --title 'v{{version}}' --notes-from-tag"
3436
}
3537
// set the project version for POM, jar manifest, etc.
3638
version = spotlessChangelog.versionNext

0 commit comments

Comments
 (0)