This document describes how to create releases using the automated GitHub Actions workflow.
The project uses GitHub Actions for automated building, testing, and releasing. There are two ways to trigger a release:
-
Create and push a version tag:
git tag v1.2.0 git push origin v1.2.0
-
The workflow will automatically:
- Validate the version format
- Run all tests across multiple platforms
- Perform security scans
- Build the JAR with dependencies
- Generate checksums (SHA256 and MD5)
- Create a GitHub release with release notes
- Upload all artifacts
- Go to GitHub Actions tab
- Select "Build and Release" workflow
- Click "Run workflow"
- Enter the version (e.g.,
v1.2.0) - Click "Run workflow"
Versions must follow semantic versioning:
- Stable releases:
1.2.0,2.0.0,1.5.3 - Pre-releases:
1.2.0-alpha.1,2.0.0-beta.2,1.5.0-rc.1
Pre-releases are automatically marked as "pre-release" on GitHub.
Each release includes:
-
Main JAR file:
metabase-jdbc-driver-{version}.jar- Contains all dependencies
- Ready to use in any JDBC client
- Includes the official Metabase icon
-
Checksums:
metabase-jdbc-driver-{version}.jar.sha256metabase-jdbc-driver-{version}.jar.md5
-
Automatic release notes with:
- Installation instructions
- DBeaver setup guide
- Connection URL examples
- Verification steps
Runs on every push and pull request:
- Multi-platform testing (Ubuntu, Windows, macOS)
- Multi-Java version testing (Java 11, 17, 21)
- Code quality analysis with coverage reports
- Build verification with JAR integrity checks
Runs on version tags and manual triggers:
- Environment validation
- Security scanning with OWASP Dependency Check
- Cross-platform testing
- JAR building and verification
- Checksum generation
- GitHub release creation
- Artifact publishing
If you need to create a release manually:
-
Update version in pom.xml:
mvn versions:set -DnewVersion=1.2.0
-
Build and test:
mvn clean test mvn package -
Verify JAR:
java -cp target/metabase-jdbc-driver-1.2.0-with-dependencies.jar \ com.davydmaker.metabase.jdbc.MetabaseDriver -
Create release on GitHub with the generated JAR
The pipeline includes:
- OWASP Dependency Check for known vulnerabilities
- Configurable CVSS threshold (currently 7.0)
- Suppression file for false positives
All releases include:
- SHA256 checksums for integrity verification
- MD5 checksums for compatibility
- Signed commits (if GPG signing is configured)
Build fails on version validation:
- Ensure version follows semantic versioning (X.Y.Z)
- Check that the tag starts with 'v' (e.g., v1.2.0)
Security scan fails:
- Review the OWASP report in workflow artifacts
- Update dependencies if needed
- Add suppressions to
owasp-suppression.xmlfor false positives
JAR verification fails:
- Check that all required classes are present
- Verify MANIFEST.MF is properly configured
- Ensure services file exists for JDBC driver registration
- Workflow logs: Check GitHub Actions tab for detailed logs
- Artifacts: Download build artifacts from failed runs
- Issues: Create an issue if the problem persists
If a release has issues:
- Mark release as pre-release on GitHub
- Create hotfix branch from the problematic tag
- Fix the issue and create a new patch version
- Release the fixed version
Recommended branch protection rules:
- Require pull request reviews
- Require status checks (CI must pass)
- Require branches to be up to date
- Restrict pushes to main branch