release #54
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: release | |
on: | |
workflow_dispatch: | |
inputs: | |
module: | |
description: 'Module to release' | |
type: choice | |
required: true | |
options: | |
- refarch-gateway | |
- refarch-integrations | |
- refarch-tools/refarch-java-tools | |
release-version: | |
description: 'Release version' | |
type: string | |
required: true | |
default: "X.Y.Z" | |
next-version: | |
description: "Next version to use after release" | |
type: string | |
required: true | |
default: "X.Y.Z-SNAPSHOT" | |
jobs: | |
build-maven: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Maven build and release | |
uses: ./.github/actions/release-maven | |
with: | |
module: ${{ inputs.module }} | |
release-version: ${{ inputs.release-version }} | |
next-version: ${{ inputs.next-version }} | |
gpg-private-key: ${{ secrets.gpg_private_key }} | |
gpg-passphrase: ${{ secrets.gpg_passphrase }} | |
sonatype-username: ${{ secrets.sonatype_username }} | |
sonatype-password: ${{ secrets.sonatype_password }} | |
build-images-gateway: | |
if: inputs.module == 'refarch-gateway' | |
needs: build-maven | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build and push image | |
uses: it-at-m/.github/.github/actions/action-build-image@main | |
with: | |
registry-username: ${{ github.actor }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
path: ./refarch-gateway | |
artifact-name: "target" | |
image-name: refarch-gateway | |
image-tags: | | |
type=raw,value=${{ inputs.release-version }} | |
type=raw,value=latest,enable=${{ inputs.release == true }} | |
build-images-integrations: | |
if: inputs.module == 'refarch-integrations' | |
needs: build-maven | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: s3-integration-rest-service | |
path: ./refarch-integrations/refarch-s3-integration/refarch-s3-integration-rest/refarch-s3-integration-rest-service | |
steps: | |
- name: Build and push images | |
uses: it-at-m/.github/.github/actions/action-build-image@main | |
with: | |
registry-username: ${{ github.actor }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
path: ${{ matrix.path }} | |
artifact-name: "target" | |
image-name: ${{ matrix.name }} | |
image-tags: | | |
type=raw,value=${{ inputs.release-version }} | |
type=raw,value=latest,enable=${{ inputs.release == true }} | |
create-github-release: | |
needs: build-maven | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 | |
with: | |
tag_name: "${{ inputs.module }}_${{ github.event.inputs.release-version }}" | |
draft: false | |
prerelease: false | |
generate_release_notes: true |