Skip to content

Commit

Permalink
Add GitHub releases (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored Jul 8, 2024
2 parents 2596951 + 0099585 commit 793dfb0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/base/changelog.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 793dfb0

Please sign in to comment.