Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/publish-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
- uses: gradle/actions/setup-gradle@v6
Comment on lines 16 to 20
- name: Download build
uses: actions/download-artifact@v8
Expand All @@ -34,7 +35,19 @@ jobs:
with:
args: |
build/*.jar
- name: Check for tagged release
id: check_tag
run: |
if git tag --points-at HEAD | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "is_release_tag=true" >> "$GITHUB_OUTPUT"
else
echo "is_release_tag=false" >> "$GITHUB_OUTPUT"
fi
- name: Gradle Publish
# Both a branch push and its accompanying tag push trigger this workflow from the
# same release. Skip the branch-triggered run when it's also sitting on a release
# tag, so only the tag-triggered run publishes (avoids a duplicate-version 409).
if: ${{ !(github.ref_type == 'branch' && steps.check_tag.outputs.is_release_tag == 'true') }}
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 3 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
# Changelog

## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security
- Changelog plugin no longer pre-populates the new Unreleased section with empty Keep a Changelog group headers
- Release hook now fails loudly (instead of silently skipping the whole release) if the Unreleased section has no content when a release runs
- Publish workflow's registry publish step is skipped on the branch-triggered run when it's also sitting on a release tag, avoiding a duplicate-version 409 against the tag-triggered run

## [0.3.0] - 2026-07-22

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ scmVersion {

changelog {
repositoryUrl.set("https://github.com/dotRun/MCVotifierLib")
groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"))
groups.set(emptyList())
}

fun patchChangelogToVersion(newVersion: String) {
Expand All @@ -43,6 +43,7 @@ fun patchChangelogToVersion(newVersion: String) {
.apply {
version.set(newVersion)
header.set("$newVersion - ${date()}")
patchEmpty.set(false)
}.run()
}

Expand Down