Skip to content

Commit 6537399

Browse files
committed
Attempt a release action
Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Attempt a release action Signed-off-by: Rob Stryker <rob@oxbeef.net> Change wording in release script Signed-off-by: Rob Stryker <rob@oxbeef.net> Release script bug - add debugging line Signed-off-by: Rob Stryker <rob@oxbeef.net> Release script bug - add debugging line Signed-off-by: Rob Stryker <rob@oxbeef.net> Release script bug - fixing vsce and ovsx publish commands Signed-off-by: Rob Stryker <rob@oxbeef.net> Fix publishing commands Signed-off-by: Rob Stryker <rob@oxbeef.net>
1 parent 217bc62 commit 6537399

File tree

2 files changed

+81
-4
lines changed

2 files changed

+81
-4
lines changed

.github/workflows/gh-actions.yml

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@ on:
66
pull_request:
77
branches: [master]
88
workflow_dispatch:
9-
9+
inputs:
10+
publishToMarketPlace:
11+
description: 'Publish to VS Code Marketplace ?'
12+
required: true
13+
type: choice
14+
options:
15+
- 'true'
16+
- 'false'
17+
default: 'false'
18+
publishToOVSX:
19+
description: 'Publish to OpenVSX Registry ?'
20+
required: true
21+
type: choice
22+
options:
23+
- 'true'
24+
- 'false'
25+
default: 'false'
1026
jobs:
1127
test:
1228
runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS
@@ -59,4 +75,64 @@ jobs:
5975
uses: codecov/codecov-action@v4
6076
with:
6177
file: ./coverage/coverage-final.json
62-
78+
79+
packaging-job:
80+
runs-on: ubuntu-latest
81+
if: ${{ github.event_name != 'schedule' }}
82+
steps:
83+
- name: Checkout vscode-server-connector
84+
uses: actions/checkout@v4
85+
- name: Set Up NodeJS
86+
uses: actions/setup-node@v4
87+
with:
88+
node-version: '18'
89+
- name: Install NodeJS dependencies
90+
run: npm install -g typescript "@vscode/vsce" "ovsx"
91+
- name: Cache Version
92+
run: |
93+
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
94+
- name: Build vscode-server-connector
95+
run: |
96+
npm install
97+
npm run build
98+
- name: Package vscode-server-connector
99+
run: |
100+
vsce package -o vscode-server-connector-${{ env.EXT_VERSION }}.vsix
101+
ls -lash *.vsix
102+
- name: Upload VSIX Artifacts
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: vscode-server-connector
106+
path: |
107+
vscode-server-connector-${{ env.EXT_VERSION }}.vsix
108+
if-no-files-found: error
109+
release-job:
110+
environment: ${{ (inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true') && 'release' }}
111+
runs-on: ubuntu-latest
112+
needs: packaging-job
113+
steps:
114+
- name: Set Up NodeJS
115+
uses: actions/setup-node@v4
116+
with:
117+
node-version: '18'
118+
- name: Install dependencies
119+
run: |
120+
npm install -g typescript "@vscode/vsce" "ovsx"
121+
- name: Download VSIX
122+
uses: actions/download-artifact@v4
123+
- name: Publish to VS Code Marketplace
124+
if: ${{ inputs.publishToMarketPlace == 'true' }}
125+
run: |
126+
ls -la #debug
127+
for platformVsix in vscode-server-connector/*.vsix; do
128+
echo "Running command: vsce publish --skip-duplicate -p SOME_SECRET --packagePath ${platformVsix}"
129+
vsce publish --skip-duplicate -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath ${platformVsix}
130+
done
131+
- name: Publish to OpenVSX Registry
132+
if: ${{ inputs.publishToOVSX == 'true' }}
133+
run: |
134+
ls -la #debug
135+
for platformVsix in vscode-server-connector/*.vsix; do
136+
echo "Running command: ovsx publish --skip-duplicate -p SOME_SECRET --packagePath ${platformVsix}"
137+
ovsx publish --skip-duplicate -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --packagePath ${platformVsix}
138+
done

npmUpversionMicroTagPush.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ read -p "Press enter to continue"
4949
vsce package
5050
echo "Did the package work?"
5151
read -p "Press enter to continue"
52-
53-
echo "Go to Jenkins and do a proper build there first."
52+
echo ""
53+
echo ""
54+
echo "Go to https://github.com/redhat-developer/vscode-server-connector/actions/workflows/gh-actions.yml and trigger a build there first."
5455
echo "Come back when that's green."
5556
read -p "Press enter to continue"
5657

0 commit comments

Comments
 (0)