Skip to content

Commit e697b64

Browse files
authored
Merge pull request #49 from agntcy/version-check
ci: add version check to release
2 parents 121962f + 3b43659 commit e697b64

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Diff for: .github/workflows/release-image.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,29 @@ concurrency:
1515
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1616

1717
jobs:
18+
checkout-version-check:
19+
name: checkout & version check
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Version check
28+
run: |
29+
MAIN_VERSION=${GITHUB_REF_NAME%-*}
30+
GIT_TAG_VERSION=${MAIN_VERSION#v}
31+
PYPROJECT_VERSION=$(grep -m 1 version pyproject.toml | grep -e '[0-9].[0-9].[0-9]' -o)
32+
if [[ "$GIT_TAG_VERSION" == "$PYPROJECT_VERSION" ]]; then
33+
printf "Version check passed"
34+
else
35+
printf "Version check failed: version in pyproject.toml (%s) and git tag version (%s) are mismatched" "$PYPROJECT_VERSION" "$GIT_TAG_VERSION"
36+
exit 1
37+
fi
1838
build-push:
1939
name: Build docker image - wfsrv
40+
needs: [checkout-version-check]
2041
uses: ./.github/workflows/reusable-docker-build-push.yaml
2142
permissions:
2243
contents: "read"

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agent-workflow-server"
3-
version = "0.2.1"
3+
version = "0.2.3"
44
description = ""
55
authors = [
66
{name = "Janos Sarusi-Kis", email = "[email protected]"},

0 commit comments

Comments
 (0)