@@ -13,26 +13,39 @@ inputs:
1313 repo_role_arn :
1414 description : " Repo Role Arn"
1515 required : true
16+ mode :
17+ description : " Release Normal / Hive"
18+ required : false
19+ default : normal
1620
1721runs :
1822 using : " composite"
1923 steps :
20- - name : Update release to github
24+ - name : Update normal release to github
2125 shell : bash
2226 # Reference: https://cli.github.com/manual/gh_release_upload
27+ if : inputs.mode == 'normal'
2328 run : gh release upload ${{ inputs.version }} databend-${{ inputs.version }}-${{ inputs.target }}.* --clobber
2429 env :
2530 GH_TOKEN : ${{ inputs.github_token }}
2631
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+
2739 - name : Configure AWS credentials
2840 uses : aws-actions/configure-aws-credentials@v1
2941 with :
3042 role-duration-seconds : 900
3143 role-to-assume : ${{ inputs.repo_role_arn }}
3244 aws-region : us-east-2
3345
34- - name : Sync release to S3
46+ - name : Sync normal release to S3
3547 shell : bash
48+ if : inputs.mode == 'normal'
3649 run : |
3750 aws s3 cp databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz s3://repo.databend.rs/databend/${{ inputs.version }}/databend-${{ inputs.version }}-${{ inputs.target }}.tar.gz
3851 curl --retry 3 -fsSLo tags.json \
4760 https://api.github.com/repos/datafuselabs/databend/releases
4861 cat releases.json
4962 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