Skip to content

Commit 525a787

Browse files
committed
ci(runner): add option to skip upload vsix into marketplaces step in publish pipeline
1 parent df51539 commit 525a787

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/runner-publish.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
tag:
77
description: "Version tag to publish (runner-vX.X.X)"
88
required: true
9+
skipPublish:
10+
description: "Skip publish into marketplaces step"
11+
default: false
12+
type: boolean
913

1014
permissions:
1115
contents: write
@@ -77,7 +81,10 @@ jobs:
7781

7882
- name: 🛠 Extract version from a tag
7983
id: version
80-
run: echo "VERSION=${{ github.event.inputs.tag }}" | sed 's/^runner-v//' >> $GITHUB_OUTPUT
84+
run: |
85+
TAG=${{ github.event.inputs.tag }}
86+
VER=$(echo "$TAG" | sed 's/^runner-v//')
87+
echo "VERSION=$VER" >> $GITHUB_OUTPUT
8188
8289
- name: 🛠 Package extension
8390
working-directory: packages/extester-runner
@@ -88,17 +95,20 @@ jobs:
8895
run: vsce ls extester-runner-${{ steps.version.outputs.VERSION }}.vsix
8996

9097
- name: 🚀 Publish to VS Code Marketplace
98+
if: ${{ github.event.inputs.skipPublish != 'true' }}
9199
working-directory: packages/extester-runner
92100
run: vsce publish --pat ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath extester-runner-${{ steps.version.outputs.VERSION }}.vsix
93101

94102
- name: 🚀 Publish to Open VSX Registry
103+
if: ${{ github.event.inputs.skipPublish != 'true' }}
95104
working-directory: packages/extester-runner
96105
run: ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} extester-runner-${{ steps.version.outputs.VERSION }}.vsix
97106

98107
- name: 📣 Add summary
108+
if: ${{ github.event.inputs.skipPublish != 'true' }}
99109
run: |
100-
echo "### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to VS Code Marketplace" >> $GITHUB_STEP_SUMMARY
101-
echo "### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to Open VSX Registry" >> $GITHUB_STEP_SUMMARY
110+
echo "#### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to VS Code Marketplace" >> $GITHUB_STEP_SUMMARY
111+
echo "#### ✅ Published \`extester-runner-${{ steps.version.outputs.VERSION }}.vsix\` to Open VSX Registry" >> $GITHUB_STEP_SUMMARY
102112
103113
- name: 💾 Upload VSIX
104114
uses: actions/upload-artifact@v4
@@ -154,7 +164,7 @@ jobs:
154164
working-directory: packages/extester-runner
155165
run: |
156166
TAG=${{ github.event.inputs.tag }}
157-
gh release create "$TAG" --clobber \
167+
gh release create "$TAG" \
158168
--title "ExTester Runner v${{ steps.version.outputs.VERSION }}" \
159169
--notes "${{ steps.changelog.outputs.changelog }}" \
160170
"extester-runner-${{ steps.version.outputs.VERSION }}.vsix"

0 commit comments

Comments
 (0)