generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (95 loc) · 3.29 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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:
description: 'Release?'
type: boolean
default: true
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/build-maven
with:
module: ${{ inputs.module }}
release: ${{ inputs.release }}
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: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and push image
uses: ./.github/actions/build-image
with:
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
path: ./refarch-gateway
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: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and push images
uses: ./.github/actions/build-image
with:
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
path: ${{ matrix.path }}
image-name: ${{ matrix.name }}
image-tags: |
type=raw,value=${{ inputs.release-version }}
type=raw,value=latest,enable=${{ inputs.release == true }}
create-github-release:
if: ${{ inputs.release == true }}
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