-
Notifications
You must be signed in to change notification settings - Fork 231
66 lines (61 loc) · 2.07 KB
/
github-release.yml
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
name: GitHub Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
jobs:
github-release:
name: GitHub Release with tgz
strategy:
matrix:
platform: [ "ubuntu-22.04" ]
jdk: ["17"]
runs-on: ${{ matrix.platform }}
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: "zulu"
- name: Setup Gradle
uses: gradle/[email protected]
- name: Build TarGz
run: |
./gradlew -Pprefix=automq-${{ github.ref_name }}_ --build-cache --refresh-dependencies clean releaseTarGz
mkdir -p core/build/distributions/latest
for file in core/build/distributions/automq-*.tgz; do
if [[ ! "$file" =~ site-docs ]]; then
echo "Find latest tgz file: $file"
cp "$file" core/build/distributions/latest/automq-kafka-latest.tgz
break
else
echo "Skip and remove site-docs file: $file"
rm "$file"
fi
done
- uses: jakejarvis/s3-sync-action@master
name: s3-upload-latest
if: ${{ github.repository_owner == 'AutoMQ' }}
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_CN_PROD_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CN_PROD_AK }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CN_PROD_SK }}
AWS_REGION: 'cn-northwest-1'
SOURCE_DIR: 'core/build/distributions/latest'
DEST_DIR: 'community_edition/artifacts'
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
draft: false
generate_release_notes: true
files: |
./core/build/distributions/automq-*.tgz