Skip to content

Commit 1d92fb2

Browse files
mohan-13N0-man
authored andcommitted
BAH-2287 | Implement release versioning
1 parent 9339434 commit 1d92fb2

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/deploy_publish.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- master
6+
- 'release-*'
7+
tags:
8+
- '[0-9]+.[0-9]+.[0-9]+'
69
paths-ignore:
710
- "**.md"
811

@@ -16,16 +19,11 @@ jobs:
1619
- uses: actions/checkout@v2
1720
with:
1821
fetch-depth: 0
19-
- name: Verify app version
22+
- name: Set artifact version
2023
run: |
21-
APP_VERSION=$(cat package/.appversion)
22-
if [ $(git tag -l "$APP_VERSION") ]; then
23-
echo "App version $APP_VERSION already released. Please update app version in package/.appversion to represent next major/minor/patch increment"
24-
exit 1
25-
else
26-
echo "setting artifact version to $(echo $APP_VERSION-${{github.run_number}})"
27-
echo "ARTIFACT_VERSION=$(echo $APP_VERSION-${{github.run_number}})" >> $GITHUB_ENV
28-
fi
24+
wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh
25+
./setArtifactVersion.sh
26+
rm setArtifactVersion.sh
2927
- name: Use Node.js 14.x
3028
uses: actions/setup-node@v1
3129
with:
@@ -35,11 +33,11 @@ jobs:
3533
- name: Install dependencies root
3634
run: npm install
3735
- name: run test
38-
run: npm run test
39-
- name: Build
40-
run: npm run build
36+
run: npm run test
37+
- name: Build
38+
run: npm run build
4139
- name: Login to DockerHub
42-
uses: docker/login-action@v1
40+
uses: docker/login-action@v1
4341
with:
4442
username: ${{ secrets.DOCKER_HUB_USERNAME }}
4543
password: ${{ secrets.DOCKER_HUB_TOKEN }}

0 commit comments

Comments
 (0)