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
14 changes: 12 additions & 2 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release and tag version'
description: 'Release version (e.g., 2.0.0, 2.0.0-M1, 2.0.0-RC1)'
required: true
default: "1.5.0"
default: "2.0.0"
developmentVersion:
description: 'Version to use for new working copy'
required: true
Expand All @@ -33,6 +33,16 @@ jobs:
git config user.email "actions@github.com"
git config user.name "GitHub Actions"

- name: Validate version format
run: |
VERSION="${{ github.event.inputs.releaseVersion }}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-M[0-9]+|-RC[0-9]+)?$ ]]; then
echo "Error: Version '$VERSION' does not match valid pattern"
echo "Expected formats: X.Y.Z, X.Y.Z-MN, or X.Y.Z-RCN"
exit 1
fi
echo "Version '$VERSION' is valid"

- name: Run release release.yml
env:
GITHUB_ACTOR: ${{ github.actor }}
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: Publish Release to Maven Central
on:
push:
tags:
- '*'
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-M[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-RC[0-9]+'
workflow_dispatch:
inputs:
tag:
description: 'Tag to checkout and publish'
description: 'Tag to checkout and publish (e.g., 2.0.0, 2.0.0-M1, 2.0.0-RC1)'
required: true
type: string

Expand All @@ -20,6 +22,16 @@ jobs:
with:
ref: ${{ inputs.tag }}

- name: Validate tag format
run: |
TAG="${{ github.ref_name || inputs.tag }}"
if [[ ! "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-M[0-9]+|-RC[0-9]+)?$ ]]; then
echo "Error: Tag '$TAG' does not match valid version pattern"
echo "Expected formats: X.Y.Z, X.Y.Z-MN, or X.Y.Z-RCN"
exit 1
fi
echo "Tag '$TAG' is valid"

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
Expand Down
15 changes: 15 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release Process for Tarantool Java SDK

## Version Types

We use the following version formats:

| Type | Format | Example | Description |
|------|--------|---------|-------------|
| Final Release | `X.Y.Z` | `2.0.0` | Production-ready release |
| Milestone | `X.Y.Z-MN` | `2.0.0-M1` | Early preview for testing |
| Release Candidate | `X.Y.Z-RCN` | `2.0.0-RC1` | Pre-release for final validation |
| Development | `X.Y.Z-dev.N` | `2.0.0-dev.1` | Internal development builds (not for Maven Central) |

## Release Steps

Follow these steps to prepare and publish a new release:

1. **Update JavaDoc and Project Documentation**
Expand All @@ -20,7 +33,9 @@ Follow these steps to prepare and publish a new release:

4. **Run the "Prepare Release" Workflow**
- After the PR is merged, trigger the "Prepare Release" workflow (using Maven Release Plugin) to prepare the release.
- Enter the release version (e.g., `2.0.0`, `2.0.0-M1`, or `2.0.0-RC1`) and the next development version.
- This will update versions, tag the release, and push changes to the repository.
- **For Milestones and RCs**: The tag will trigger the release workflow automatically. After publishing to Maven Central, mark the GitHub release as "Pre-release".
Comment thread
bitgorbovsky marked this conversation as resolved.

5. **Publish Artifacts to Maven Central**
- Once the workflow completes successfully, go to Maven Central and publish the release from the service account.
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
</developers>

<scm>
<connection>scm:git:https://github.com/tarantool/tarantool-java-sdk.git</connection>
<developerConnection>scm:git:https://github.com/tarantool/tarantool-java-sdk.git</developerConnection>
<url>scm:git:https://github.com/tarantool/tarantool-java-sdk.git</url>
<connection>scm:git:git@github.com:tarantool/tarantool-java-sdk.git</connection>
<developerConnection>scm:git:git@github.com:tarantool/tarantool-java-sdk.git</developerConnection>
<url>https://github.com/tarantool/tarantool-java-sdk.git</url>
<tag>HEAD</tag>
</scm>

Expand Down
Loading