-
Notifications
You must be signed in to change notification settings - Fork 11
113 lines (113 loc) · 4.96 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
101
102
103
104
105
106
107
108
109
110
111
112
113
name: mvn-deploy
on:
push:
tags:
- "*"
jobs:
npm-publish:
name: mvn-publishdeploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Use Java 15
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
check-latest: true
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@a362e5fb42057a3a23a62218b050838f1bacca5d #v4
- name: Validate Tag
run: npx semver $GITHUB_REF_SLUG
- name: Version and build kafka-management-sdk
working-directory: ./packages/kafka-management-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Version and build kafka-instance-sdk
working-directory: ./packages/kafka-instance-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Version and build registry-management-sdk
working-directory: ./packages/registry-management-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Version and build connector-management-sdk
working-directory: ./packages/connector-management-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Version and build service-accounts-sdk
working-directory: ./packages/service-accounts-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Version and build smartevents
working-directory: ./packages/smartevents-management-sdk
run : |
mvn versions:set -DnewVersion=$GITHUB_REF_SLUG
mvn package -Prelease
- name: Publish kafka-management-sdk
working-directory: ./packages/kafka-management-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish kafka-instance-sdk
working-directory: ./packages/kafka-instance-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish registry-management-sdk
working-directory: ./packages/registry-management-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish connector-management-sdk
working-directory: ./packages/connector-management-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish smartevents-management-sdk
working-directory: ./packages/smartevents-management-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Publish service accounts
working-directory: ./packages/service-accounts-sdk
run: mvn --batch-mode -Prelease -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Install git-chglog
uses: craicoverflow/install-git-chglog@6d338c1d96dcbf12a2115fbe8e5b9817293aae33 #v1
- name: Generate changelog
run: |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$(git-chglog $GITHUB_REF_SLUG 2> /dev/null || echo '**PRERELEASE**')" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Update Release Notes
uses: meeDamian/github-release@7ae19492500104f636b3fee4d8103af0fed36c8e #2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ env.CHANGELOG }}
allow_override: true