Skip to content

Commit 0fa0c91

Browse files
committed
fix(ci): version tag matching pattern and update the Change Log format
1 parent cb1b777 commit 0fa0c91

File tree

7 files changed

+31
-21
lines changed

7 files changed

+31
-21
lines changed

.github/workflows/api-release.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ jobs:
3030
images: ghcr.io/memodb-io/acontext-api
3131
tags: |
3232
type=sha
33-
type=semver,pattern={{version}},match=v(\d.\d.\d)$
33+
type=semver,pattern={{version}},match=api/v(\d+\.\d+\.\d+)$
34+
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@v3
3437

3538
- name: Set up Docker Buildx
3639
uses: docker/setup-buildx-action@v3
@@ -54,7 +57,7 @@ jobs:
5457
5558
- name: Generate Changelog
5659
run: |
57-
echo "# API ${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
60+
echo "# API v${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
5861
echo "" >> ${{ github.workspace }}-CHANGELOG.txt
5962
echo "Published to https://github.com/memodb-io/Acontext/pkgs/container/acontext-api" >> ${{ github.workspace }}-CHANGELOG.txt
6063

.github/workflows/cli-release.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CLI Release
33
on:
44
push:
55
tags:
6-
- 'cli/v*.*.*'
6+
- 'cli/v*'
77

88
permissions:
99
contents: write
@@ -19,9 +19,17 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22-
# TODO: add changelog generation
22+
- name: Extract version from tag
23+
id: version
24+
run: |
25+
TAG_NAME=${GITHUB_REF#refs/tags/cli/v}
26+
echo "version=$TAG_NAME" >> $GITHUB_OUTPUT
27+
2328
- name: Generate Changelog
24-
run: echo "# Changelog" > ${{ github.workspace }}-CHANGELOG.txt
29+
run: |
30+
echo "# CLI v${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
31+
echo "" >> ${{ github.workspace }}-CHANGELOG.txt
32+
echo "Binary artifacts are available in this release." >> ${{ github.workspace }}-CHANGELOG.txt
2533
2634
- name: Create Release with Notes
2735
uses: softprops/action-gh-release@v1

.github/workflows/client-release-py.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Python Client Release
33
on:
44
push:
55
tags:
6-
- 'sdk-py/v*.*.*'
6+
- 'sdk-py/v*'
77
workflow_dispatch:
88

99
permissions:
@@ -32,21 +32,21 @@ jobs:
3232
with:
3333
version: "latest"
3434

35-
- name: Build distribution
36-
run: uv build
37-
38-
- name: Publish to PyPI
39-
run: uv publish
40-
4135
- name: Extract version from tag
4236
id: version
4337
run: |
4438
TAG_NAME=${GITHUB_REF#refs/tags/sdk-py/v}
4539
echo "version=$TAG_NAME" >> $GITHUB_OUTPUT
4640
41+
- name: Build distribution
42+
run: uv build
43+
44+
- name: Publish to PyPI
45+
run: uv publish
46+
4747
- name: Generate Changelog
4848
run: |
49-
echo "# Python SDK ${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
49+
echo "# Python SDK v${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
5050
echo "" >> ${{ github.workspace }}-CHANGELOG.txt
5151
echo "Published to https://pypi.org/project/acontext/${{ steps.version.outputs.version }}/" >> ${{ github.workspace }}-CHANGELOG.txt
5252

.github/workflows/client-release-ts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: TypeScript Client Release
33
on:
44
push:
55
tags:
6-
- 'sdk-ts/v*.*.*'
6+
- 'sdk-ts/v*'
77
workflow_dispatch:
88

99
permissions:

.github/workflows/client-test-py.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
- dev
88
paths:
99
- 'src/client/acontext-py/**'
10-
- '.github/workflows/client-test.yaml'
10+
- '.github/workflows/client-test-py.yaml'
1111
pull_request:
1212
branches:
1313
- main
1414
- dev
1515
paths:
1616
- 'src/client/acontext-py/**'
17-
- '.github/workflows/client-test.yaml'
17+
- '.github/workflows/client-test-py.yaml'
1818

1919
jobs:
2020
test:

.github/workflows/core-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
images: ghcr.io/memodb-io/acontext-core
3131
tags: |
3232
type=sha
33-
type=semver,pattern={{version}},match=v(\d.\d.\d)$
33+
type=semver,pattern={{version}},match=core/v(\d+\.\d+\.\d+)$
3434
3535
- name: Set up QEMU
3636
uses: docker/setup-qemu-action@v3
@@ -57,7 +57,7 @@ jobs:
5757
5858
- name: Generate Changelog
5959
run: |
60-
echo "# Core ${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
60+
echo "# Core v${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
6161
echo "" >> ${{ github.workspace }}-CHANGELOG.txt
6262
echo "Published to https://github.com/memodb-io/Acontext/pkgs/container/acontext-core" >> ${{ github.workspace }}-CHANGELOG.txt
6363

.github/workflows/ui-release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
images: ghcr.io/memodb-io/acontext-ui
3131
tags: |
3232
type=sha
33-
type=semver,pattern={{version}},match=v(\d.\d.\d)$
33+
type=semver,pattern={{version}},match=ui/v(\d+\.\d+\.\d+)$
3434
3535
- name: Set up QEMU
3636
uses: docker/setup-qemu-action@v3
@@ -49,7 +49,6 @@ jobs:
4949
cache-from: type=gha
5050
cache-to: type=gha
5151

52-
5352
- name: Extract version from tag
5453
id: version
5554
run: |
@@ -58,7 +57,7 @@ jobs:
5857
5958
- name: Generate Changelog
6059
run: |
61-
echo "# UI ${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
60+
echo "# UI v${{ steps.version.outputs.version }}" > ${{ github.workspace }}-CHANGELOG.txt
6261
echo "" >> ${{ github.workspace }}-CHANGELOG.txt
6362
echo "Published to https://github.com/memodb-io/Acontext/pkgs/container/acontext-ui" >> ${{ github.workspace }}-CHANGELOG.txt
6463

0 commit comments

Comments
 (0)