Skip to content

0.0.2

0.0.2 #8

name: Deploy to Maven Central
env:
JAVA_VERSION: '17'
MAVEN_VERSION: '3.6.3'
on:
release:
types: [ "released" ]
jobs:
#blackduck:
# name: Blackduck Scan
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - name: Checkout
# uses: actions/checkout@v5
# - name: Scan With Black Duck
# uses: ./.github/actions/scan-with-blackduck
# with:
# blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
# github_token: ${{ secrets.GITHUB_TOKEN }}
# maven-version: ${{ env.MAVEN_VERSION }}
update-version:
name: Update Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.GH_TOKEN }}
- name: Update version
uses: ./.github/actions/newrelease
with:
java-version: ${{ env.JAVA_VERSION }}
maven-version: ${{ env.MAVEN_VERSION }}
- name: Upload Changed Artifacts
uses: actions/upload-artifact@v5
with:
name: root-new-version
path: .
include-hidden-files: true
retention-days: 1
build:
#name: Build and Sonar Scan
name: Build
runs-on: ubuntu-latest
needs: update-version
steps:
- name: Download artifact
uses: actions/download-artifact@v6
with:
name: root-new-version
- name: Build
uses: ./.github/actions/build
with:
java-version: ${{ env.JAVA_VERSION }}
maven-version: ${{ env.MAVEN_VERSION }}
#- name: Sonar Scan
# uses: ./.github/actions/scan-with-sonar
# with:
# java-version: ${{ env.JAVA_VERSION }}
# maven-version: ${{ env.MAVEN_VERSION }}
# sonarq-token: ${{ secrets.SONARQ_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Changed Artifacts
uses: actions/upload-artifact@v5
with:
name: root-build
include-hidden-files: true
path: .
retention-days: 1
deploy:
name: Deploy to Maven Central
runs-on: ubuntu-latest
#needs: [blackduck, build]
needs: [build]
steps:
- name: Download artifact
uses: actions/download-artifact@v6
with:
name: root-build
- name: Deploy
uses: ./.github/actions/deploy-release
with:
user: ${{ secrets.CENTRAL_REPOSITORY_USER }}
password: ${{ secrets.CENTRAL_REPOSITORY_PASS }}
pgp-pub-key: ${{ secrets.PGP_PUBKEY_ID }}
pgp-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}
revision: ${{ github.event.release.tag_name }}
maven-version: ${{ env.MAVEN_VERSION }}
- name: Echo Status
run: echo "The job status is ${{ job.status }}"