|
| 1 | +# GitHub Actions Workflows |
| 2 | + |
| 3 | +This directory contains the GitHub Actions workflows for the project. |
| 4 | + |
| 5 | +## Workflows |
| 6 | + |
| 7 | +### 1. tests.yml |
| 8 | +- **Trigger**: Push to master branch or pull requests to master |
| 9 | +- **Purpose**: Run all tests (unit and integration) on multiple Tarantool versions |
| 10 | +- **Runs on**: Ubuntu latest |
| 11 | + |
| 12 | +### 2. release.yml |
| 13 | +- **Trigger**: Creation of tags matching semantic versioning pattern (e.g., `1.4.0`, `2.0.1`) |
| 14 | +- **Purpose**: Automatically release to Maven Central and create GitHub Release |
| 15 | +- **Runs on**: Ubuntu latest |
| 16 | +- **Requires secrets**: |
| 17 | + - `OSSRH_USERNAME` - Sonatype OSSRH username |
| 18 | + - `OSSRH_TOKEN` - Sonatype OSSRH password or token |
| 19 | + - `MAVEN_GPG_PRIVATE_KEY` - GPG private key for signing artifacts |
| 20 | + - `MAVEN_GPG_PASSPHRASE` - Passphrase for the GPG key |
| 21 | + - `TARANTOOL_REGISTRY_PASSWORD` - Password for Tarantool private registry |
| 22 | + |
| 23 | +### 3. snapshot.yml |
| 24 | +- **Trigger**: Push to master branch (except commits starting with "Release") |
| 25 | +- **Purpose**: Automatically deploy snapshot versions to Maven Central |
| 26 | +- **Runs on**: Ubuntu latest |
| 27 | +- **Requires secrets**: |
| 28 | + - `OSSRH_USERNAME` - Sonatype OSSRH username |
| 29 | + - `OSSRH_TOKEN` - Sonatype OSSRH password or token |
| 30 | + - `TARANTOOL_REGISTRY_PASSWORD` - Password for Tarantool private registry |
| 31 | + |
| 32 | +## Setup Instructions |
| 33 | + |
| 34 | +To enable automatic releases, you need to configure the following secrets in your GitHub repository settings: |
| 35 | + |
| 36 | +1. Go to Settings → Secrets and variables → Actions |
| 37 | +2. Add the following secrets: |
| 38 | + - `OSSRH_USERNAME` - Your Sonatype OSSRH username |
| 39 | + - `OSSRH_TOKEN` - Your Sonatype OSSRH token/password |
| 40 | + - `MAVEN_GPG_PRIVATE_KEY` - Your GPG private key (export with `gpg --export-secret-keys --armor KEY_ID`) |
| 41 | + - `MAVEN_GPG_PASSPHRASE` - Passphrase for your GPG key |
| 42 | + - `TARANTOOL_REGISTRY_PASSWORD` - Password for the Tarantool private registry |
| 43 | + |
| 44 | +## Release Process |
| 45 | + |
| 46 | +### Automatic Release |
| 47 | +1. Create and push a new tag with semantic versioning format (e.g., `git tag 1.4.0 && git push origin 1.4.0`) |
| 48 | +2. The release workflow will automatically: |
| 49 | + - Build and test the project |
| 50 | + - Sign the artifacts with GPG |
| 51 | + - Deploy to Maven Central |
| 52 | + - Create a GitHub Release |
| 53 | + |
| 54 | +### Automatic Snapshot Deployment |
| 55 | +1. Push changes to the master branch |
| 56 | +2. The snapshot workflow will automatically: |
| 57 | + - Build and test the project |
| 58 | + - Deploy snapshot version to Maven Central |
| 59 | + |
| 60 | +Note: Commits with messages starting with "Release" are excluded from snapshot deployment to avoid duplicate deployments during the release process. |
0 commit comments