@@ -13,26 +13,39 @@ inputs:
13
13
repo_role_arn :
14
14
description : " Repo Role Arn"
15
15
required : true
16
+ mode :
17
+ description : " Release Normal / Hive"
18
+ required : false
19
+ default : normal
16
20
17
21
runs :
18
22
using : " composite"
19
23
steps :
20
- - name : Update release to github
24
+ - name : Update normal release to github
21
25
shell : bash
22
26
# Reference: https://cli.github.com/manual/gh_release_upload
27
+ if : inputs.mode == 'normal'
23
28
run : gh release upload ${{ inputs.version }} databend-${{ inputs.version }}-${{ inputs.target }}.* --clobber
24
29
env :
25
30
GH_TOKEN : ${{ inputs.github_token }}
26
31
32
+ - name : Update hive release to github
33
+ shell : bash
34
+ if : inputs.mode == 'hive'
35
+ run : gh release upload ${{ inputs.version }} databend-hive-${{ inputs.version }}-${{ inputs.target }}.* --clobber
36
+ env :
37
+ GH_TOKEN : ${{ inputs.github_token }}
38
+
27
39
- name : Configure AWS credentials
28
40
uses : aws-actions/configure-aws-credentials@v1
29
41
with :
30
42
role-duration-seconds : 900
31
43
role-to-assume : ${{ inputs.repo_role_arn }}
32
44
aws-region : us-east-2
33
45
34
- - name : Sync release to S3
46
+ - name : Sync normal release to S3
35
47
shell : bash
48
+ if : inputs.mode == 'normal'
36
49
run : |
37
50
aws s3 cp databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz
38
51
curl --retry 3 -fsSLo tags.json \
47
60
https://api.github.com/repos/datafuselabs/databend/releases
48
61
cat releases.json
49
62
aws s3 cp ./releases.json s3://repo.databend.rs/databend/releases.json
63
+
64
+ - name : Sync hive release to S3
65
+ shell : bash
66
+ if : inputs.mode == 'hive'
67
+ run : |
68
+ aws s3 cp databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-hive-${{ inputs.version }}-${{ inputs.target }}.tar.gz
69
+ curl --retry 3 -fsSLo tags.json \
70
+ --header 'content-type: application/json' \
71
+ --header 'authorization: Bearer ${{ inputs.github_token }}' \
72
+ https://api.github.com/repos/datafuselabs/databend/tags
73
+ cat tags.json
74
+ aws s3 cp ./tags.json s3://repo.databend.rs/databend/tags.json
75
+ curl --retry 3 -fsSLo releases.json \
76
+ --header 'content-type: application/json' \
77
+ --header 'authorization: Bearer ${{ inputs.github_token }}' \
78
+ https://api.github.com/repos/datafuselabs/databend/releases
79
+ cat releases.json
80
+ aws s3 cp ./releases.json s3://repo.databend.rs/databend/releases.json
0 commit comments