diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7ae0afbb..215e9c16 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,6 +23,19 @@ jobs: echo exit code $? git tag --list + # jgitver only treats annotated tags as releases. A tag created in the GitHub Releases page is lightweight and + # would be built as a snapshot, so annotate the plain x.y.z tags (locally, on the runner only). Tags with a + # suffix (e.g. 1.5.0-xp, experimental releases) are intentionally left lightweight. + - name: Annotate the release tag + if: github.ref_type == 'tag' + run: | + if [[ "$GITHUB_REF_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \ + tag -f -a "$GITHUB_REF_NAME" -m "Release $GITHUB_REF_NAME" "$GITHUB_REF_NAME^{commit}" + else + echo "Tag $GITHUB_REF_NAME is not a plain x.y.z version: left as it is (experimental release)." + fi + - name: Set up JDK 17 uses: actions/setup-java@v4 with: diff --git a/README.md b/README.md index 4db2d488..d559531d 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,18 @@ git tag -a 1.2.29 # Your EDITOR will open. Write a good message and save as it is used on Github as a release message git push origin 1.2.29 ``` -Then you need to [create a new release](https://github.com/feedzai/feedzai-openml-java/releases/new) with this tag. +Alternatively, [create a new release](https://github.com/feedzai/feedzai-openml-java/releases/new) directly in GitHub, choosing +"Create new tag on publish": the tag it creates is lightweight, so the [deploy workflow](.github/workflows/deploy.yml) annotates +plain `x.y.z` tags before building (on the runner only; the tag in the repository is not changed). +In both cases create (or edit) the release for this tag on GitHub to publish the release notes. There is a "Generate release notes" button available to create the release notes, just organize them according [to the previous ones](https://github.com/feedzai/feedzai-openml-java/releases). ### Experimental Release -For experimental releases, the process is the same as above but with a lightweight tag instead of annotated. +For experimental releases, the process is the same as above but with a lightweight tag instead of annotated. The tag name must have a +suffix (for example `1.5.0-xp`): the deploy workflow annotates plain `x.y.z` tags, which makes them public releases. ```bash -#the xp part is not needed, what matters is that the tag is not annotated, but is a good indicator for others that this was a tag for an experimental release +#the xp suffix is needed: a plain x.y.z tag is turned into a public release by the deploy workflow. The tag must not be annotated git tag 1.5.0-xp git push origin 1.5.0-xp ``` diff --git a/pom.xml b/pom.xml index 46124c4e..15dd5dec 100644 --- a/pom.xml +++ b/pom.xml @@ -72,14 +72,19 @@ UTF-8 1.8 8 - 4.13.1 + 4.13.2 3.7.0 1.2.0 - 2.6.7 - 2.6.7 - 2.7 + 2.21.8 + 2.21 + 2.21.8 + 2.21.0 1.8 - 2.20.0 + 2.24.3 + 33.4.8-jre + 1.3.16 + 2.0.17 + 3.19.0 @@ -126,7 +131,7 @@ com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + ${jackson-annotations.version} com.fasterxml.jackson.core @@ -134,6 +139,23 @@ ${jackson-databind.version} + + + com.google.guava + guava + ${guava.version} + + + ch.qos.logback + logback-core + ${logback.version} + + + ch.qos.logback + logback-classic + ${logback.version} + + com.google.code.gson gson @@ -143,13 +165,13 @@ org.slf4j slf4j-api - 1.7.36 + ${slf4j.version} org.apache.commons commons-lang3 - 3.13.0 + ${commons-lang3.version}