Skip to content
Merged
6 changes: 4 additions & 2 deletions .github/workflows/broken_links_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Configure broken links checker
run: |
mkdir -p ./target
echo '{ "aliveStatusCodes": [429, 200] }' > ./target/broken_links_checker.json
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: tcort/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
Expand Down
58 changes: 46 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
contents: read

strategy:
fail-fast: true
fail-fast: false
matrix:
java: [17]
os: [ubuntu-latest, macos-latest, windows-latest]
java: [17, 21, 25]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
java: 21
- os: macos-latest
java: 17
- os: windows-latest
java: 17

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-os-${{ matrix.os }}-java-${{ matrix.java }}
Expand All @@ -35,21 +37,20 @@ jobs:

steps:

- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: |
17
21
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Cache SonarQube packages
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java }}
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand All @@ -58,12 +59,14 @@ jobs:
- name: Build with Java ${{ matrix.java }}
run: |
mvn --batch-mode -T 1C clean org.jacoco:jacoco-maven-plugin:prepare-agent install \
-DossindexSkip=true \
-Djava.version=${{ matrix.java }}

- name: Sonar analysis
if: ${{ env.DEFAULT_OS == matrix.os && env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}
run: |
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-DossindexSkip=true \
-Dsonar.token=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,10 +75,41 @@ jobs:
- name: Verify reproducible build
run: |
mvn --batch-mode -T 1C clean verify artifact:compare -DskipTests \
-DossindexSkip=true \
-Djava.version=${{ matrix.java }}

build:
needs: matrix-build
ossindex:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-java@v5
with:
cache: maven
distribution: temurin
java-version: 17
server-id: ossindex
server-username: OSSINDEX_USERNAME
server-password: OSSINDEX_TOKEN
- name: Ossindex
if: ${{ env.OSSINDEX_USERNAME != null && env.OSSINDEX_TOKEN != null }}
run: |
mvn --errors --batch-mode test-compile \
org.sonatype.ossindex.maven:ossindex-maven-plugin:audit \
org.sonatype.ossindex.maven:ossindex-maven-plugin:audit-aggregate
env:
OSSINDEX_USERNAME: ${{ secrets.OSSINDEX_USERNAME }}
OSSINDEX_TOKEN: ${{ secrets.OSSINDEX_TOKEN }}

build:
needs:
- matrix-build
- ossindex
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- run: echo "Build successful"
11 changes: 6 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 4 * * 3'

jobs:
analyze:
Expand All @@ -22,7 +20,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false

- uses: actions/setup-java@v5
with:
Expand All @@ -35,8 +35,9 @@ jobs:
with:
languages: java

- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Build
# gitcommitid plugin requires a newer version of maven, so we skip it here
run: mvn --batch-mode --errors -Dmaven.gitcommitid.skip=true clean compile

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: true
type: boolean
default: false
maven-central-auto-publish:
description: "Automatically publish to Maven Central"
required: true
type: boolean
default: true

jobs:
release:
Expand All @@ -22,7 +27,9 @@ jobs:
contents: write # Required for creating GitHub release
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: true

- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
Expand All @@ -37,25 +44,31 @@ jobs:
distribution: "temurin"
java-version: 17
cache: "maven"
server-id: ossrh
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Build
run: mvn --batch-mode -T 1C clean install
run: mvn --batch-mode -T 1C clean install -DossindexSkip=true

- name: List secret GPG keys
run: gpg --list-secret-keys

- name: Publish to Maven Central Repository
if: ${{ !inputs.skip-deploy-maven-central }}
run: mvn --batch-mode deploy -DskipTests -Possrh -DstagingDescription="Deployed via GitHub workflow release.yml"
run: |
mvn --batch-mode deploy -DskipTests -PcentralPublishing
-DossindexSkip=true \
-DcentralPublishingDeploymentName="Deployed OFT Asciidoc Plugin via release.yml" \
-DcentralPublishingSkipPublishing=false \
-DcentralPublishingAutoPublish=${AUTO_PUBLISH}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
AUTO_PUBLISH: ${{ inputs.maven-central-auto-publish }}

- name: Create GitHub Release
run: ./.github/workflows/github_release.sh
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"source.generate.finalModifiers": "explicit",
"source.fixAll": "explicit"
},
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"java.configuration.updateBuildConfiguration": "automatic",
Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* [0.1.0](changes_0.1.0.md)
* [0.2.0](changes_0.2.0.md)
* [0.3.0](changes_0.3.0.md)
* [0.3.1](changes_0.3.1.md)
11 changes: 11 additions & 0 deletions doc/changes/changes_0.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# OpenFastTrace AsciiDoc Plugin 0.3.1, released 2026-05-15

Code name: Update Maven Central publishing

## Summary

This release updates dependencies and uses the new Maven Central Portal publishing process. The release also updates dependencies.

## Bug Fixes

* [PR #18](https://github.com/itsallcode/openfasttrace-asciidoc-plugin/pull/18): Updated dependencies
Loading
Loading