Skip to content

Commit 2243036

Browse files
authored
Merge pull request RooCodeInc#1533 from pdecat/ci/publish_tags
ci: publish git tags to Github (resolves RooCodeInc#444)
2 parents 6644202 + f99fc59 commit 2243036

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Update GitHub Actions workflow to automatically create and push git tags during release

.github/workflows/marketplace-publish.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ env:
1010
jobs:
1111
publish-extension:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write # Required for pushing tags
1315
if: >
1416
( github.event_name == 'pull_request' &&
1517
github.event.pull_request.base.ref == 'main' &&
@@ -23,24 +25,24 @@ jobs:
2325
- uses: actions/setup-node@v4
2426
with:
2527
node-version: 18
28+
2629
- run: |
2730
git config user.name github-actions
2831
git config user.email [email protected]
32+
2933
- name: Install Dependencies
3034
run: |
3135
npm install -g vsce ovsx
3236
npm run install:ci
37+
3338
- name: Create .env file
3439
run: |
3540
echo "# PostHog API Keys for telemetry" > .env
3641
echo "POSTHOG_API_KEY=${{ secrets.POSTHOG_API_KEY }}" >> .env
37-
- name: Package and Publish Extension
38-
env:
39-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
40-
OVSX_PAT: ${{ secrets.OVSX_PAT }}
42+
43+
- name: Package Extension
4144
run: |
4245
current_package_version=$(node -p "require('./package.json').version")
43-
4446
npm run vsix
4547
package=$(unzip -l bin/roo-cline-${current_package_version}.vsix)
4648
echo "$package"
@@ -49,5 +51,18 @@ jobs:
4951
echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1
5052
echo "$package" | grep -q ".env" || exit 1
5153
54+
- name: Create and Push Git Tag
55+
run: |
56+
current_package_version=$(node -p "require('./package.json').version")
57+
git tag -a "v${current_package_version}" -m "Release v${current_package_version}"
58+
git push origin "v${current_package_version}"
59+
echo "Successfully created and pushed git tag v${current_package_version}"
60+
61+
- name: Publish Extension
62+
env:
63+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
64+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
65+
run: |
66+
current_package_version=$(node -p "require('./package.json').version")
5267
npm run publish:marketplace
5368
echo "Successfully published version $current_package_version to VS Code Marketplace"

0 commit comments

Comments
 (0)