Skip to content

Commit 841f668

Browse files
committed
chore: Update version when releases are published
Updates the version number in the user agent header when a new release is created.
1 parent 8124555 commit 841f668

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,14 @@ jobs:
4646
config-file: .github/release-config.json
4747
manifest-file: .github/release-manifest.json
4848
token: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Configure version
50+
if: ${{ steps.release.outputs.prs_created }}
51+
run: |
52+
version=${{ steps.release.outputs.tag_name }}
53+
version=${version#v}
54+
sed -i "s/unfunco\/anthropic-sdk-go@v[0-9]*\.[0-9]*\.[0-9]*/unfunco\/anthropic-sdk-go@v$version/" anthropic.go
55+
git config user.name "David Letterman"
56+
git config user.email "48985810+david-letterman@users.noreply.github.com"
57+
git add anthropic.go
58+
git commit -m "Configure version number"
59+
git push

0 commit comments

Comments
 (0)