Skip to content

Create Early Access Release #123

Create Early Access Release

Create Early Access Release #123

Workflow file for this run

name: Create Early Access Release
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
uses: sualeh/[email protected]
with:
java-version: 8
- id: install-graphviz
name: Install Graphviz
uses: sualeh/[email protected]
# BUILD FOR DISTRIBUTION
- id: build
name: Build and test for distribution
shell: bash
run: |
# Build
mvn \
--no-transfer-progress \
--batch-mode \
-Ddistrib \
-Ddocker.skip=false \
clean install
# CREATE GITHUB RELEASE AND ADD ASSETS
- id: tag
name: Move early-access-release tag
shell: bash
if: false
run: |
# Move tag
git tag -d early-access-release
git push --delete origin early-access-release
git tag -a early-access-release -m "SchemaCrawler Early Access Release"
git push --follow-tags
- id: create-release
name: Create GitHub release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') != true }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: early-access-release
name: early-access-release
draft: false
prerelease: true
body: |
SchemaCrawler ${{ github.event.release.tag_name }} early access release at last commit ${{ github.sha }}
generate_release_notes: true
files: |
./schemacrawler-distrib/target/schemacrawler-16.20.6-distribution.zip
./schemacrawler-distrib/target/schemacrawler-16.20.6-distribution.zip.SHA-512
./schemacrawler-distrib/target/schemacrawler-16.20.6-bin.zip
./schemacrawler-distrib/target/schemacrawler-16.20.6-bin.zip.SHA-512
# PUBLISH DOCKER IMAGE
- id: publish-docker-image
name: Publish Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
shell: bash
run: |
# Publish Docker image
docker version
docker tag schemacrawler/schemacrawler:latest \
schemacrawler/schemacrawler:early-access-release
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push schemacrawler/schemacrawler:early-access-release
docker logout