11on :
22 workflow_dispatch :
33 inputs :
4- VERSION :
5- description : ' Version to build'
6- required : false
7- type : string
84 TAG :
95 description : ' Tag name to use'
106 required : false
117 type : string
128
139env :
14- VERSION : ${{ inputs.VERSION }}
10+ REGISTRY : ${{ vars.DOCKERHUB_REGISTRY }}
1511 TAG : ${{ inputs.TAG }}
1612
1713jobs :
14+
1815 draft :
1916 runs-on : ubuntu-latest
2017 steps :
2118 - name : Checkout
2219 uses : actions/checkout@v3
23- - name : Run github-create-draft
24- run : make github-create-draft
25- env :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20+ - name : Create draft release
21+ uses : ncipollo/release-action@v1
22+ with :
23+ tag : ${{ env.TAG }}
24+ name : ${{ env.TAG }}
25+ bodyFile : RELEASE.md
26+ draft : true
27+ generateReleaseNotes : true
28+ removeArtifacts : true
2729
2830 docker-build :
2931 needs : [draft]
3032 runs-on : ${{ matrix.runs_on }}
3133 strategy :
34+ fail-fast : false
3235 matrix :
3336 include :
3437 - runs_on : ubuntu-24.04-arm
35- docker_arch : arm64v8
38+ arch : arm64
3639 - runs_on : ubuntu-24.04
37- docker_arch : amd64
40+ arch : arm64
41+ env :
42+ ARCH : ${{ matrix.arch }}
3843 steps :
3944 - name : Checkout
4045 uses : actions/checkout@v3
4146 - name : Set up QEMU
4247 uses : docker/setup-qemu-action@v2
48+
49+ # Compile and release
50+ - name : Compile and release for ${{matrix.arch}}
51+ run :
52+ ./release.bash "${{ env.REGISTRY }}:${{ env.TAG }}" build-tgz build-image
53+
54+ # Push to DockerHub
4355 - name : Login to Docker Hub
4456 uses : docker/login-action@v3
4557 with :
4658 username : ${{ secrets.DOCKERHUB_USERNAME }}
4759 password : ${{ secrets.DOCKERHUB_TOKEN }}
48- - name : Run dockerhub for ${{matrix.docker_arch}}
49- run : make ${{matrix.docker_arch}}-dockerhub
50- - name : Run deb for ${{matrix.docker_arch}}
51- run : make ${{matrix.docker_arch}}-deb
52- - name : Upload deb files
53- run : make github-upload-all
54- env :
55- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ - name : Run docker push for ${{matrix.arch}}
61+ run :
62+ ./release.bash "${{ env.REGISTRY }}:${{ env.TAG }}" push-image
63+
64+ # Upload files to draft release
65+ - name : Upload files to draft release
66+ uses : ncipollo/release-action@v1
67+ with :
68+ tag : ${{ env.TAG }}
69+ artifacts : release/*.tgz
70+ allowUpdates : true
71+ updateOnlyUnreleased : true
72+ omitBodyDuringUpdate : true
73+ omitNameDuringUpdate : true
74+ omitDraftDuringUpdate : true
5675
5776 client-build :
5877 needs : [draft]
5978 runs-on : ${{ matrix.runs_on }}
6079 strategy :
80+ fail-fast : false
6181 matrix :
6282 include :
6383 - runs_on : ubuntu-24.04-arm
64- docker_arch : arm64v8
84+ arch : arm64
6585 - runs_on : ubuntu-24.04
66- docker_arch : amd64
86+ arch : amd64
87+ env :
88+ ARCH : ${{ matrix.arch }}
6789 steps :
6890 - name : Checkout
6991 uses : actions/checkout@v3
7092 - name : Set up QEMU
7193 uses : docker/setup-qemu-action@v2
94+
95+ # Compile the client
7296 - name : Run client for ${{matrix.docker_arch}}
73- run : make ${{matrix.docker_arch}}-client
74- - name : Upload artifacts
75- run : make github-upload-all
76- env :
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97+ run : ./release.bash "${{ env.REGISTRY }}:${{ env.TAG }}" client-tgz
98+
99+ # Upload files to draft release
100+ - name : Upload files to draft release
101+ uses : ncipollo/release-action@v1
102+ with :
103+ tag : ${{ env.TAG }}
104+ artifacts : release/*.tgz
105+ allowUpdates : true
106+ updateOnlyUnreleased : true
107+ omitBodyDuringUpdate : true
108+ omitNameDuringUpdate : true
109+ omitDraftDuringUpdate : true
78110
79111 prerelease :
80112 runs-on : ubuntu-latest
81113 needs : [client-build, docker-build]
82114 steps :
83115 - name : Checkout
84116 uses : actions/checkout@v3
117+
118+ # Update docker manifest
85119 - name : Login to Docker Hub
86120 uses : docker/login-action@v3
87121 with :
88122 username : ${{ secrets.DOCKERHUB_USERNAME }}
89123 password : ${{ secrets.DOCKERHUB_TOKEN }}
90- - name : Run dockerhub-manifest
91- run : make dockerhub-manifest
92- - name : Run github-create-pre-release
93- run : make github-create-pre-release
94- env :
95- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
124+ - name : Create manifest
125+ run :
126+ ./release.bash "${{ env.REGISTRY }}:${{ env.TAG }}" manifest
127+
128+ # Create pre-release
129+ - name : Make release as pre-release
130+ uses : ncipollo/release-action@v1
131+ with :
132+ tag : ${{ env.TAG }}
133+ prerelease : true
134+ allowUpdates : true
135+ updateOnlyUnreleased : true
136+ omitBodyDuringUpdate : true
137+ omitNameDuringUpdate : true
0 commit comments