Skip to content

Commit

Permalink
Use semver
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Dec 22, 2024
1 parent 5ec4102 commit 0ebbacf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- v[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-[A-Z])?
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,6 +16,19 @@ jobs:
runs-on: ubuntu-latest
steps:

# VALIDATE TAGS
- id: validate-semver
name: Validate tag against semantic versioning
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
SEMVER_PATTERN="^refs/tags/v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$"
if [[ ! $GITHUB_REF =~ $SEMVER_PATTERN ]]
then
echo "Tag $GITHUB_REF does not follow semantic versioning"
exit 1
fi
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
Expand Down Expand Up @@ -61,8 +74,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./target/schemacrawler-webapp-16.24.2.1.jar
asset_name: schemacrawler-webapp-16.24.2.1.jar
asset_path: ./target/schemacrawler-webapp-16.24.2-1.jar
asset_name: schemacrawler-webapp-16.24.2-1.jar
asset_content_type: application/zip

# BUILD AND PUBLISH DOCKER IMAGE
Expand All @@ -89,7 +102,7 @@ jobs:
linux/amd64
linux/arm64
tags: |-
schemacrawler/schemacrawler-webapp:v16.24.2.1
schemacrawler/schemacrawler-webapp:v16.24.2-1
schemacrawler/schemacrawler-webapp:latest
sbom: true
provenance: true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
FROM eclipse-temurin:21-jdk-alpine

ARG SCHEMACRAWLER_VERSION=16.24.2
ARG SCHEMACRAWLER_WEBAPP_VERSION=16.24.2.1
ARG SCHEMACRAWLER_WEBAPP_VERSION=16.24.2-1

LABEL \
"maintainer"="Sualeh Fatehi <sualeh@hotmail.com>" \
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>us.fatehi</groupId>
<artifactId>schemacrawler-webapp</artifactId>
<version>16.24.2.1</version>
<version>16.24.2-1</version>
<packaging>jar</packaging>

<name>SchemaCrawler Web Application</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/api/schemacrawler-web-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: SchemaCrawler Web Application
description: Create a SchemaCrawler schema diagram from an uploaded SQLite database file
version: '16.24.2.1'
version: '16.24.2-1'
license:
name: Eclipse Public License (EPL-2.0)
url: https://www.eclipse.org/legal/epl-2.0/
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


SchemaCrawler Web Application v16.24.2.1
SchemaCrawler Web Application v16.24.2-1
Spring Boot ${spring-boot.version}
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div id="footer" xmlns:dc="http://purl.org/dc/elements/1.1/" class="small">
<p id="copyright" property="dc:rights">
<span>SchemaCrawler Web Application, version 16.24.2.1</span><br />
<span>SchemaCrawler Web Application, version 16.24.2-1</span><br />
&copy;
<span property="dc:dateCopyrighted">2000-2025</span>
<span property="dc:creator">Sualeh Fatehi &lt;sualeh@hotmail.com&gt;.</span>
Expand Down

0 comments on commit 0ebbacf

Please sign in to comment.