Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
41faedb
Added an action to extract the version form tags.
jcpitre Apr 2, 2026
f615b68
Misc changes
jcpitre Apr 2, 2026
ba0a78c
Added temp trigger
jcpitre Apr 2, 2026
0d3cc57
Some corrections.
jcpitre Apr 2, 2026
71cb763
simplify GPG credential passing via environment variables in publish…
jcpitre Apr 7, 2026
7c8c7b7
simplify GPG credential passing via environment variables in publish…
jcpitre Apr 7, 2026
b2fcf6a
Suppress Maven download progress, fix shade plugin bug
jcpitre Apr 7, 2026
5a902a2
Suppress Maven download progress output in CI workflows
jcpitre Apr 7, 2026
6ec5f74
exclude META-INF/versions from shaded jar to prevent build failure on…
jcpitre Apr 7, 2026
d8f9166
Exclude module-info.class from shaded jar to prevent CI build failure
jcpitre Apr 7, 2026
d1100b2
Upgrade maven-shade-plugin to 3.6.2 to fix filtering bug causing CI b…
jcpitre Apr 7, 2026
db96a36
Enabled debug for mvn
jcpitre Apr 7, 2026
172f84a
Disable dependency-reduced POM creation to prevent git-versioning ext…
jcpitre Apr 7, 2026
dec1db2
Debugging versioning.
jcpitre Apr 7, 2026
468ca9c
add release workflow debug steps to diagnose version resolution issue
jcpitre Apr 7, 2026
db80cb7
add verbose versioning debug to release workflow
jcpitre Apr 8, 2026
fbfc806
Set release version from git tag using versions:set instead of git ve…
jcpitre Apr 8, 2026
9af1e75
Removed staging step and cleanup
jcpitre Apr 8, 2026
7b2f4ea
Restore maven-git-versioning-extension and add placeholder version gu…
jcpitre Apr 8, 2026
846dbe8
Removed slugified.
jcpitre Apr 8, 2026
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
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch:

jobs:
maven-package:
runs-on: ubuntu-24.04
Expand All @@ -15,8 +14,10 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: 17.0.13
distribution: liberica
java-version: '17'
distribution: zulu
- name: Print Java and Maven versions
run: mvn --version
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
Expand All @@ -27,7 +28,7 @@ jobs:
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Run maven build
run: mvn verify -PprettierCheck -Dprettier.nodePath=node -Dprettier.npmPath=npm
run: mvn verify -PprettierCheck -Dprettier.nodePath=node -Dprettier.npmPath=npm -ntp
- name: codecov
uses: codecov/codecov-action@v5
with:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Publish Snapshot

concurrency:
group: deploy-master
cancel-in-progress: false

on:
push:
branches:
- master
- 187-create-mobilitydata-maven-packages # TEMPORARY: remove after testing
workflow_dispatch: # Manual trigger

env:
java_version: '17'
java_distribution: 'zulu'

jobs:
publish-snapshot:
if: "github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, 'ci skip')"
runs-on: ubuntu-24.04
env:
HAS_1PASSWORD: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN != '' && vars.ONE_PASSWORD_SECRET_REFERENCES != '' }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK ${{ env.java_version }}-${{ env.java_distribution }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- name: Print Java and Maven versions
run: mvn --version
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Load secrets from 1Password
if: env.HAS_1PASSWORD == 'true'
uses: MobilityData/gtfs-validator/.github/actions/extract-1password-secret@master
with:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
VARIABLES_TO_EXTRACT: 'MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME, MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD'
ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }}
- name: Load secrets from GitHub secrets (fallback for forks without 1Password)
if: env.HAS_1PASSWORD != 'true'
env:
GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
GPG_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MVN_USER: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME }}
MVN_PASS: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD }}
run: |
{
echo "MAVEN_GPG_PASSPHRASE=$GPG_PASS"
echo "MAVEN_GPG_PRIVATE_KEY<<GPG_EOF"
echo "$GPG_KEY"
echo "GPG_EOF"
echo "MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME=$MVN_USER"
echo "MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD=$MVN_PASS"
} >> "$GITHUB_ENV"
- name: Stage artifacts
run: mvn deploy -Ppublication -Dprettier.skip=true -ntp
- name: Publish snapshot to Maven Central
env:
JRELEASER_GPG_PASSPHRASE: ${{ env.MAVEN_GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
run: mvn jreleaser:deploy -Djreleaser.output.directory=out -ntp
- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-snapshot-logs
path: out/
57 changes: 0 additions & 57 deletions .github/workflows/deploy.yml

This file was deleted.

102 changes: 102 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Release

# Triggered when a GitHub release is published (released).
# Builds, signs, and publishes all artifacts to Maven Central automatically.
# The CLI fat jar is also uploaded to the GitHub release assets.
#
# The project version is derived from the git tag (e.g. v3.0.0 → 3.0.0) and applied to all
# modules in-place via versions:set before building. No pom.xml version commits are needed.
on:
release:
types: [released]

env:
java_version: '17'
java_distribution: 'zulu'

jobs:
release:
runs-on: ubuntu-24.04
permissions:
contents: write
env:
HAS_1PASSWORD: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN != '' && vars.ONE_PASSWORD_SECRET_REFERENCES != '' }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
# Check out the exact tagged commit so the version is correctly resolved from the tag.
ref: ${{ github.event.release.tag_name }}
- name: Set up JDK ${{ env.java_version }}-${{ env.java_distribution }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
- name: Print Java and Maven versions
run: mvn --version
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Load secrets from 1Password
if: env.HAS_1PASSWORD == 'true'
uses: MobilityData/gtfs-validator/.github/actions/extract-1password-secret@master
with:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
VARIABLES_TO_EXTRACT: 'MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME, MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD'
ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }}
- name: Load secrets from GitHub secrets (fallback for forks without 1Password)
if: env.HAS_1PASSWORD != 'true'
env:
GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
GPG_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MVN_USER: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME }}
MVN_PASS: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD }}
run: |
{
echo "MAVEN_GPG_PASSPHRASE=$GPG_PASS"
echo "MAVEN_GPG_PRIVATE_KEY<<GPG_EOF"
echo "$GPG_KEY"
echo "GPG_EOF"
echo "MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME=$MVN_USER"
echo "MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD=$MVN_PASS"
} >> "$GITHUB_ENV"
- name: Set release version from tag
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
echo "Setting version: $VERSION"
mvn --batch-mode -ntp versions:set -DnewVersion="$VERSION" -DprocessAllModules=true -DgenerateBackupPoms=false
- name: Verify version is not placeholder
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$VERSION" == *"placeholder"* || "$VERSION" == "0.0.0"* ]]; then
echo "ERROR: Version is still '$VERSION' — aborting release."
exit 1
fi
echo "Version OK: $VERSION"
- name: Stage artifacts
run: mvn deploy -Ppublication -Dprettier.skip=true -ntp
- name: Deploy to Maven Central
env:
JRELEASER_GPG_PASSPHRASE: ${{ env.MAVEN_GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
run: mvn jreleaser:deploy -Djreleaser.output.directory=out -ntp
- name: Upload CLI fat jar to GitHub release
run: |
gh release upload "${{ github.event.release.tag_name }}" \
gbfs-validator-java-cli/target/gbfs-validator-cli.jar \
--clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-release-logs
path: out/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ buildNumber.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Generated by maven-git-versioning-extension at build time — not to be committed
.git-versioned-pom.xml

.vscode
10 changes: 10 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 https://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.11.0</version>
</extension>
</extensions>
23 changes: 23 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension
https://github.com/qoomon/maven-git-versioning-extension/raw/master/src/main/resources/configuration-schema.xsd">

<refs>
<!-- Tagged commit: use the tag version directly (e.g. v2.0.67 → 2.0.67) -->
<ref type="tag" pattern="v(?&lt;version&gt;.*)">
<version>${version}</version>
</ref>

<!-- master branch: increment patch and add SNAPSHOT (e.g. after v2.0.66 → 2.0.67-SNAPSHOT) -->
<ref type="branch" pattern="master">
<version>${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT</version>
</ref>

<!-- Any other branch: use branch name + SNAPSHOT for local development -->
<ref type="branch" pattern=".*">
<version>${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT</version>
</ref>
</refs>
</configuration>
9 changes: 5 additions & 4 deletions gbfs-validator-java-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<parent>
<groupId>org.mobilitydata</groupId>
<artifactId>gbfs-validator-java-parent</artifactId>
<version>2.0.67</version>
<!-- Version is derived at build time from the latest git tag via maven-git-versioning-extension (.mvn/). -->
<version>0.0.0-placeholder</version>
</parent>

<artifactId>gbfs-validator-java-api</artifactId>
<name>gbfs-validator-java-api</name>
<description>gbfs-validator-java-api</description>
<url>https://github.com/entur/gbfs-validator-java</url>
<url>https://github.com/MobilityData/gbfs-validator-java</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
Expand Down Expand Up @@ -134,13 +135,13 @@
<dependency>
<groupId>org.mobilitydata</groupId>
<artifactId>gbfs-validator-java-loader</artifactId>
<version>2.0.67</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.mobilitydata</groupId>
<artifactId>gbfs-validator-java</artifactId>
<version>2.0.67</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Loading
Loading