Skip to content

Commit c9123db

Browse files
committed
fix: remove unnecessary version bump/PR step from prerelease workflow
The version is bumped manually prior to release, so the automated version bump and PR creation in the publish job is unnecessary and was causing the workflow to report as failed despite successful publishing.
1 parent 294ba93 commit c9123db

1 file changed

Lines changed: 0 additions & 61 deletions

File tree

‎.github/workflows/preview.yaml‎

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,10 @@ jobs:
125125
needs:
126126
- build
127127
if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true'
128-
permissions:
129-
contents: write
130-
pull-requests: write
131128
steps:
132-
# 0. Setup git
133129
- name: Checkout
134130
uses: actions/checkout@v6
135131

136-
- name: Set up Git
137-
run: |
138-
git config --local user.email "action@github.com"
139-
git config --local user.name "GitHub Action"
140-
141-
- name: Pull latest changes from release
142-
run: git fetch origin ${{ github.ref }} && git checkout ${{ github.ref }}
143-
144132
# 1. Download the artifacts
145133
- uses: actions/download-artifact@v8
146134
with:
@@ -163,52 +151,3 @@ jobs:
163151
cd extensions/vscode
164152
npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix
165153
166-
# 4. Create PR with version bump
167-
- name: Setup Node.js
168-
uses: actions/setup-node@v6
169-
with:
170-
node-version-file: ".nvmrc"
171-
172-
- name: Create PR branch
173-
run: |
174-
BRANCH_NAME="chore/bump-vscode-version-$(date +%Y%m%d-%H%M%S)"
175-
git checkout -b $BRANCH_NAME
176-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
177-
178-
- name: Bump version in package.json
179-
run: |
180-
cd extensions/vscode
181-
npm version patch --no-git-tag-version
182-
VERSION=$(node -p "require('./package.json').version")
183-
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
184-
185-
- name: Create Pull Request
186-
uses: peter-evans/create-pull-request@v8
187-
with:
188-
token: ${{ secrets.CI_GITHUB_TOKEN }}
189-
commit-message: "chore: bump vscode extension version to ${{ env.NEW_VERSION }}"
190-
title: "chore: bump vscode extension version to ${{ env.NEW_VERSION }}"
191-
body: |
192-
Automated PR to bump the VS Code extension version after successful pre-release publication.
193-
194-
- Bumped version in extensions/vscode/package.json to ${{ env.NEW_VERSION }}
195-
branch: ${{ env.BRANCH_NAME }}
196-
base: main
197-
delete-branch: true
198-
199-
# 5. Update version in package.json
200-
# - name: Update version in package.json
201-
# run: |
202-
# cd extensions/vscode
203-
# npm version patch
204-
# - name: Commit changes
205-
# run: |
206-
# git config --local user.email "action@github.com"
207-
# git config --local user.name "GitHub Action"
208-
# git commit -am "💚 Update package.json version [skip ci]"
209-
210-
# - name: Push changes
211-
# uses: ad-m/github-push-action@master
212-
# with:
213-
# github_token: ${{ secrets.GITHUB_TOKEN }}
214-
# branch: ${{ github.ref }}

0 commit comments

Comments
 (0)