Skip to content

Commit 756dce8

Browse files
committed
ci: tag releases
1 parent 2786ff5 commit 756dce8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
run: pnpm build
4141

4242
- name: Create and publish versions
43+
id: changesets
4344
uses: changesets/action@v1
4445
with:
4546
commit: 'chore: update versions'
@@ -50,3 +51,15 @@ jobs:
5051
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5152
NPM_CONFIG_PROVENANCE: true
5253
NPM_CONFIG_ACCESS: public
54+
55+
- name: Tag release
56+
if: steps.changesets.outputs.published == 'true'
57+
run: |
58+
version=$(jq -r '.version' packages/agents/package.json)
59+
tag="v${version}"
60+
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
61+
echo "Tag $tag already exists"
62+
else
63+
git tag -a "$tag" -m "Release $tag"
64+
git push origin "$tag"
65+
fi

0 commit comments

Comments
 (0)