Maven release #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven release | |
on: | |
workflow_dispatch: | |
inputs: | |
version-core: | |
description: 'Major, Minor or Patch release' | |
type: choice | |
required: true | |
default: 'minor' | |
options: | |
- "major" | |
- "minor" | |
- "patch" | |
jobs: | |
build-context: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: danubetech/github-action-log-build-context@v0.1.0 | |
maven-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Import Secrets | |
uses: hashicorp/vault-action@v2.4.2 | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }} | |
caCertificate: ${{ secrets.VAULTCA }} | |
secrets: | | |
ci/data/gh-workflows/maven-danubetech-nexus username | MAVEN_USERNAME ; | |
ci/data/gh-workflows/maven-danubetech-nexus password | MAVEN_PASSWORD ; | |
ci/data/gh-workflows/maven-release-workflow token | TOKEN | |
- name: Release to Danubetech Nexus | |
uses: BernhardFuchs/docker-maven-release@use-dynamic-input | |
with: | |
release-branch-name: main | |
maven-repo-server-id: danubetech-maven-releases | |
maven-repo-server-username: ${{ env.MAVEN_USERNAME }} | |
maven-repo-server-password: ${{ env.MAVEN_PASSWORD }} | |
access-token: ${{ env.TOKEN }} | |
version-core: ${{ github.event.inputs.version-core }} | |
maven-development-version-format-minor: ${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}-SNAPSHOT | |
maven-development-version-format-major: ${parsedVersion.nextMajorVersion}.1-SNAPSHOT | |
maven-release-version-format-minor: ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.0 | |
maven-release-version-format-major: ${parsedVersion.nextMajorVersion}.0.0 | |
git-release-bot-name: "admin-bot" | |
git-release-bot-email: "admin@danubetech.com" | |
maven-args: "-Dmaven.javadoc.skip=true -DskipITs" | |
trigger-related-workflows: | |
needs: [ maven-release ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Import Secrets | |
uses: hashicorp/vault-action@v2.4.2 | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }} | |
caCertificate: ${{ secrets.VAULTCA }} | |
secrets: | | |
ci/data/gh-workflows/workflow-dispatch token | WORKFLOW_DISPATCH_TOKEN | |
- name: Repository Dispatch | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
token: ${{ env.WORKFLOW_DISPATCH_TOKEN }} | |
workflow: "Docker release image" # docker-release.yml | |
- name: Slack notification | |
if: failure() | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
fields: repo,commit,action,eventName,ref,workflow | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |