diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b58617f..bba4598 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 1.8 uses: actions/setup-java@v3 with: diff --git a/README.md b/README.md index 6addcb6..5d0d5eb 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,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 6d16971..b8a24db 100644 --- a/pom.xml +++ b/pom.xml @@ -71,15 +71,18 @@ UTF-8 1.8 - 4.13.1 + 4.13.2 3.7.0 1.35 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 + 33.4.8-jre + 3.19.0 @@ -126,7 +129,7 @@ com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + ${jackson-annotations.version} com.fasterxml.jackson.core @@ -134,6 +137,13 @@ ${jackson-databind.version} + + + com.google.guava + guava + ${guava.version} + + com.google.code.gson gson @@ -149,7 +159,7 @@ org.apache.commons commons-lang3 - 3.13.0 + ${commons-lang3.version}