generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (94 loc) · 3.25 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
name: release
on:
workflow_dispatch:
inputs:
module:
description: 'Module to release'
type: choice
required: true
options:
- refarch-gateway
- refarch-integrations
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
tag_name: "${{ inputs.module }}_${{ github.event.inputs.release-version }}"
draft: false
prerelease: false
generate_release_notes: true