release #8
This file contains hidden or 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: | |
| releaseVersion: | |
| description: "Version to use when preparing a release (e.g., 1.2.3)" | |
| required: true | |
| default: "2.1.0" | |
| developmentVersion: | |
| description: "Version to use for new local working copy (e.g., 1.2.4-SNAPSHOT)" | |
| required: true | |
| default: "2.2.0-SNAPSHOT" | |
| use-pr: | |
| description: "Use PR for version bump instead of direct push" | |
| default: "true" | |
| env: | |
| IMAGE_NAME: "dave-selfserviceportal" | |
| jobs: | |
| release-maven: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| MVN_ARTIFACT_ID: ${{ steps.maven-release-step.outputs.MVN_ARTIFACT_ID }} | |
| ARTIFACT_NAME: ${{ steps.maven-release-step.outputs.artifact-name }} | |
| env: | |
| TZ: Europe/Berlin # timezone | |
| steps: | |
| - id: maven-release-step | |
| uses: it-at-m/lhm_actions/action-templates/actions/[email protected] | |
| with: | |
| app-path: "" | |
| releaseVersion: ${{ github.event.inputs.releaseVersion }} | |
| developmentVersion: ${{ github.event.inputs.developmentVersion }} | |
| build-image: | |
| runs-on: ubuntu-latest | |
| needs: release-maven | |
| permissions: | |
| packages: write | |
| steps: | |
| - uses: it-at-m/lhm_actions/action-templates/actions/[email protected] | |
| with: | |
| path: . | |
| image-name: ${{ env.IMAGE_NAME }} | |
| artifact-name: ${{ needs.release-maven.outputs.ARTIFACT_NAME }} | |
| registry-username: ${{ github.actor }} | |
| registry-password: ${{ secrets.GITHUB_TOKEN }} | |
| image-tags: | | |
| type=semver,pattern={{version}},value=${{ github.event.inputs.releaseVersion }} | |
| image-labels: | | |
| maintainer=it@m, Landeshauptstadt Muenchen (LHM) | |
| create-github-release: | |
| needs: ["release-maven", "build-image"] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Create GitHub Release | |
| uses: it-at-m/lhm_actions/action-templates/actions/[email protected] | |
| with: | |
| artifact-name: ${{ needs.release-maven.outputs.ARTIFACT_NAME }} | |
| tag-name: ${{ needs.release-maven.outputs.MVN_ARTIFACT_ID }}-${{ github.event.inputs.releaseVersion }} | |
| artifact-path: "./target/*.jar" |