File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 6
6
version :
7
7
required : true
8
8
type : string
9
+ upload_url :
10
+ required : true
11
+ type : string
9
12
10
13
jobs :
11
14
build :
22
25
version : v3.6.3
23
26
24
27
- name : Modify chart version
28
+ id : chart_version
25
29
run : |
26
30
input=${{ inputs.version }}
27
31
chart_version=${input#*v}
32
+ echo "::set-output name=asset_name::mysql-operator-$chart_version.tgz"
28
33
sed -i "/^version:*/cversion: $chart_version" ./charts/mysql-operator/Chart.yaml
29
34
30
35
- name : Modify appVersion
@@ -38,10 +43,20 @@ jobs:
38
43
- name : Packaging the chart
39
44
run : helm package ./charts/mysql-operator/
40
45
46
+ - name : Upload asset
47
+ uses : actions/upload-release-asset@v1
48
+ env :
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
+ with :
51
+ upload_url : ${{ inputs.upload_url }}
52
+ asset_path : ./${{ steps.chart_version.outputs.asset_name }}
53
+ asset_name : ${{ steps.chart_version.outputs.asset_name }}
54
+ asset_content_type : application/gzip
55
+
41
56
- uses : actions/upload-artifact@v2
42
57
with :
43
58
name : mysql-operator-chart
44
- path : ./mysql-operator-*.tgz
59
+ path : ./${{ steps.chart_version.outputs.asset_name }}
45
60
retention-days : 1
46
61
47
62
publish :
Original file line number Diff line number Diff line change 40
40
needs : update_release_draft
41
41
with :
42
42
version : ${{ needs.update_release_draft.outputs.version }}
43
+ upload_url : ${{ needs.update_release_draft.outputs.upload_url }}
Original file line number Diff line number Diff line change 15
15
version :
16
16
description : " The release version"
17
17
value : ${{ jobs.update_release_draft.outputs.version }}
18
+ upload_url :
19
+ description : " The URL of uploading assets"
20
+ value : ${{ jobs.update_release_draft.outputs.upload_url }}
21
+
18
22
jobs :
19
23
update_release_draft :
20
24
runs-on : ubuntu-latest
21
25
outputs :
22
26
version : ${{ steps.draft.outputs.tag_name }}
27
+ upload_url : ${{ steps.draft.outputs.upload_url }}
23
28
steps :
24
29
- name : Checkout code
25
30
uses : actions/checkout@v2
58
63
asset_path : ./config/samples/mysql_v1alpha1_mysqlcluster_mysql8.yaml
59
64
asset_name : mysql_v1alpha1_mysqlcluster_mysql8.yaml
60
65
asset_content_type : application/x-yaml
66
+
67
+ - name : Upload mysqluser sample yaml
68
+ uses : actions/upload-release-asset@v1
69
+ env :
70
+ GITHUB_TOKEN : ${{ secrets.git_token }}
71
+ with :
72
+ upload_url : ${{ steps.draft.outputs.upload_url }}
73
+ asset_path : ./config/samples/mysql_v1alpha1_mysqluser.yaml
74
+ asset_name : mysql_v1alpha1_mysqluser.yaml
75
+ asset_content_type : application/x-yaml
You can’t perform that action at this time.
0 commit comments