Skip to content

Commit 706b01f

Browse files
ci: create github release on merge to live
1 parent c952ac8 commit 706b01f

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/build-and-push-image.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Build and push image
22

33
on:
4-
push:
5-
tags:
6-
- "v*"
4+
release:
5+
types: [created]
76

87
jobs:
98
build-and-push-image:

.github/workflows/create-tag.yml renamed to .github/workflows/create-release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
name: Create tag
1+
name: Create GitHub release
22

33
on:
44
push:
55
branches:
66
- live
77

88
jobs:
9-
create-tag:
9+
create-release:
1010
runs-on: ubuntu-latest
11+
env:
12+
GH_TOKEN: ${{ github.token }}
1113
steps:
1214
- uses: actions/checkout@v4
1315
- uses: actions/setup-python@v5
@@ -25,3 +27,9 @@ jobs:
2527
run: |
2628
git tag "v${VERSION}"
2729
git push origin "v${VERSION}"
30+
- name: Create release
31+
run: |
32+
gh release create "v${VERSION}" \
33+
--repo="${GITHUB_REPOSITORY}" \
34+
--title="v${VERSION}" \
35+
--generate-notes

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ alembic revision --autogenerate -m "<MESSAGE HERE>"
7474

7575
## Releasing
7676

77-
On merge to `live`, a tag will be created using the version in `pyproject.toml`,
78-
which will then trigger a docker image build.
77+
On merge to `live`, a git tag and GitHub release will be created using the version in `pyproject.toml`, which will then trigger a docker image to be built and pushed, tagged with the version and `latest`.

0 commit comments

Comments
 (0)