Skip to content

Commit 64d9e6a

Browse files
committed
Added automatic Tag and Release publication
1 parent 57e3983 commit 64d9e6a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/docker-build-publish.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Publish Docker Image
1+
name: Build, Publish Docker Image, and Create Release
22

33
on:
44
push:
@@ -35,3 +35,22 @@ jobs:
3535
run: |
3636
docker image push jwaresolutions/big-data-cluster:$version
3737
docker image push jwaresolutions/big-data-cluster:latest
38+
39+
- name: Create Git tag and push
40+
id: create_tag
41+
run: |
42+
git tag -a "v$version" -m "Release v$version"
43+
git push origin "v$version"
44+
45+
- name: Create GitHub Release
46+
uses: actions/create-release@v1
47+
with:
48+
tag_name: "v${{ env.version }}"
49+
release_name: "Release v${{ env.version }}"
50+
body: |
51+
This release corresponds to Docker image v${{ env.version }}.
52+
The image has been published to Docker Hub.
53+
draft: false
54+
prerelease: false
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)