Skip to content

Commit 6bf6246

Browse files
committed
make tags auto increment
1 parent 8e0fd2d commit 6bf6246

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ on:
33
push:
44
branches:
55
- master
6-
tags:
7-
- "*"
86
env:
97
GO_VERSION: 1.19.2
108

@@ -33,10 +31,17 @@ jobs:
3331
path: |
3432
./coverage.out
3533
./coverage.html
34+
- name: Auto Increment Semver Action
35+
uses: MCKanpolat/auto-semver-action@1.0.5
36+
id: versioning
37+
with:
38+
releaseType: ${{ secrets.RELEASE_TYPE }}
39+
incrementPerCommit: false
40+
github_token: ${{ secrets.TOKEN_GITHUB }}
3641
- name: Release application binary
3742
uses: ncipollo/release-action@v1
3843
with:
39-
tag: 1.0.0
44+
tag: v${{ steps.versioning.outputs.version }}
4045
token: ${{ secrets.TOKEN_GITHUB }}
4146
deploy:
4247
name: Deploy to docker hub
@@ -58,4 +63,4 @@ jobs:
5863
context: .
5964
file: ./Dockerfile
6065
push: true
61-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/golib_backend:1.0.0
66+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/golib_backend:${{ github.ref_name }}

0 commit comments

Comments
 (0)