Skip to content

Commit e5c0f74

Browse files
author
childish-sambino
authored
feat: add GitHub release step during deploy (#586)
1 parent f40fc4f commit e5c0f74

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/test-and-deploy.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ jobs:
4747
with:
4848
fetch-depth: 0
4949

50-
- name: Login to Docker Hub
51-
uses: docker/login-action@v1
52-
with:
53-
username: ${{ secrets.DOCKER_USERNAME }}
54-
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
55-
56-
# The expression strips off the shortest match from the front of the string to yield just the tag name as the output
57-
- name: Get tagged version
58-
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
59-
60-
- name: Build and Push image
61-
run: make docker-build docker-push
62-
6350
- name: Set up Python
6451
uses: actions/setup-python@v2
6552
with:
@@ -73,6 +60,24 @@ jobs:
7360
- name: Build package
7461
run: python -m build
7562

63+
- name: Login to Docker Hub
64+
uses: docker/login-action@v1
65+
with:
66+
username: ${{ secrets.DOCKER_USERNAME }}
67+
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
68+
69+
# The expression strips off the shortest match from the front of the string to yield just the tag name as the output
70+
- name: Get tagged version
71+
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
72+
73+
- name: Create GitHub Release
74+
uses: sendgrid/dx-automator/actions/release@main
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
78+
- name: Build and Push image
79+
run: make docker-build docker-push
80+
7681
- name: Publish package to PyPI
7782
uses: pypa/gh-action-pypi-publish@release/v1
7883
with:

0 commit comments

Comments
 (0)