Skip to content

Commit cbd38d0

Browse files
authored
Enable pushing git tags when releasing new versions (#252)
1 parent 5413e4f commit cbd38d0

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,21 @@ jobs:
5858
if git diff --quiet -- $files; then
5959
echo "No metadata changes to push"
6060
else
61+
# -- Commit all the metadata.ts files --
6162
git config user.name "github-actions[bot]"
6263
git config user.email "github-actions[bot]@users.noreply.github.com"
6364
git add $files
6465
git commit -m "chore: sync metadata files"
6566
git push origin HEAD:main
66-
fi
67-
68-
- name: Tag release
69-
# currently this step does not work due to https://github.com/openai/openai-agents-js/pull/232
70-
if: steps.changesets.outputs.published == 'true'
71-
run: |
72-
version=$(jq -r '.version' packages/agents/package.json)
73-
tag="v${version}"
74-
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
75-
echo "Tag $tag already exists"
76-
else
77-
git tag -a "$tag" -m "Release $tag"
78-
git push origin "$tag"
67+
# -- Push a new release tag as well --
68+
# We don't use changeset release command because we always do release for all the packages
69+
# Thus, creating git tags manually here
70+
version=$(jq -r '.version' packages/agents/package.json)
71+
tag="v${version}"
72+
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
73+
echo "Tag $tag already exists"
74+
else
75+
git tag -a "$tag" -m "Release $tag"
76+
git push origin "$tag"
77+
fi
7978
fi

0 commit comments

Comments
 (0)