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
33 changes: 29 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -30,6 +31,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -61,6 +63,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -92,6 +95,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -141,36 +145,57 @@ jobs:
check_name: Junit Tests - Summary
files: '**/TEST-*.xml'

# The version is derived from git tags by the gradle git-versioning plugin (see CONTRIBUTING.md#release),
# so main publishes <latest tag>-SNAPSHOT and a vX.Y.Z tag publishes X.Y.Z.
publishSnapshot:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [test, slowTest, integrationTest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
# Full history, the gradle git-versioning plugin derives the version from tags.
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Publish release package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)-SNAPSHOT
- name: Publish snapshot package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publishVersion:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [test, slowTest, integrationTest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
# Full history, the gradle git-versioning plugin derives the version from tags.
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Publish snapshot package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)
- name: Check version matches tag
run: |
version=$(./gradlew -q printVersion | tail -1)
if [ "$version" != "${GITHUB_REF_NAME#v}" ]; then
echo "::error::Gradle version '$version' does not match tag '$GITHUB_REF_NAME'"
exit 1
fi
- name: Publish release package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
256 changes: 0 additions & 256 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ make publish-local

## Versioning

- Version stored in `VERSION` file at repo root
- No version file: version is derived from `vX.Y.Z` git tags by the gradle git-versioning plugin (`build.gradle`)
- Semantic versioning: `<major>.<minor>.<patch>`
- Development versions use `-SNAPSHOT` suffix
- Releases: `make release-milestone-from-master MILESTONE=X.Y.Z`
- Tag checkout builds `X.Y.Z`, anything else builds `<latest tag>-SNAPSHOT`; print with `make gitversion`, override with `-Pversion=...`
- Releases: create a `vX.Y.Z` release/tag on `main` on GitHub, see CONTRIBUTING.md#release
- Dependency versions managed in `versions.properties` (refreshVersions plugin); update with `./gradlew refreshVersions`
Loading
Loading