Skip to content

Commit

Permalink
Fix CI after initial testing (#1015)
Browse files Browse the repository at this point in the history
This PR fixes up publishing CI after initial testing.

Co-authored-by: @balins
Co-authored-by: @kacperkapusciak

### How Has This Been Tested: 

- run CI job

---------

Co-authored-by: Jakub Baliński <[email protected]>
  • Loading branch information
filip131311 and balins authored Mar 6, 2025
1 parent 1d125b7 commit 8283c8a
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 25 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/package-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
inputs:
publish:
description: 'Publish to marketplaces'
default: true
type: boolean
prerelease:
description: 'Mark as pre-release'
default: false
type: boolean
target_macos:
Expand Down Expand Up @@ -71,48 +67,48 @@ jobs:
cache: npm
cache-dependency-path: packages/vscode-extension/package-lock.json

- name: Change directory
run: cd packages/vscode-extension

- name: Install dependencies
working-directory: packages/vscode-extension
run: npm ci

- name: Prepare package name for artifact upload
id: prepare_name
run: |
ref_name=$(echo -n "${{ github.event.inputs.ref }}" | xargs | sed 's/[\\\/'"'"':<>|*?]/-/g')
package_name=radon-ide-${ref_name}-${{ steps.date.outputs.date }}
echo "package_name=$package_name" >> $GITHUB_OUTPUT
- name: Package extension
uses: HaaLeo/publish-vscode-extension@v1
working-directory: packages/vscode-extension
id: package_extension
with:
dryRun: true
pat: stub
target: ${{ steps.set_targets.outputs.targets }}
preRelease: ${{ github.event.inputs.prerelease }}

- name: Sanitize ref name for artifact upload
id: sanitize
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ref_name=$(echo -n "${{ github.event.inputs.ref }}" | sed 's/[\\\/'"'"':<>|*?]/-/g')
echo "ref_name=$ref_name" >> $GITHUB_OUTPUT
out_path=/tmp/${{ steps.prepare_name.outputs.package_name }}.vsix
npm run vscode:package -- --out $out_path --target ${{ steps.set_targets.outputs.targets }}
echo "vsix_path=$out_path" >> $GITHUB_OUTPUT
- name: Upload extension artifact
uses: actions/upload-artifact@v4
with:
name: radon-ide-${{ steps.sanitize.outputs.ref_name }}-${{ steps.date.outputs.date }}
path: ${{ steps.package_extension.outputs.vsixPath }}
name: ${{ steps.prepare_name.outputs.package_name }}
path: ${{ steps.package_extension.outputs.vsix_path }}

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.publish }}
if: ${{ github.event.inputs.publish == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.package_extension.outputs.vsixPath }}
extensionFile: ${{ steps.package_extension.outputs.vsix_path }}
pat: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.publish }}
if: ${{ github.event.inputs.publish == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
extensionFile: ${{ steps.package_extension.outputs.vsixPath }}
extensionFile: ${{ steps.package_extension.outputs.vsix_path }}
pat: ${{ secrets.OPENVSX_MARKETPLACE_TOKEN }}
249 changes: 249 additions & 0 deletions packages/vscode-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
"test": "npm run build:extension && npm run build:webview && npm run build:tests && vscode-test",
"preinstall": "bash ./scripts/init-submodules-if-not-present.sh ../vscode-js-debug && cd ../vscode-js-debug && npm i && npm exec tsc",
"fetch:sim-server-assets": "bash ./scripts/download-sim-server-release-assets.sh dist",
"fetch:third-party": "bash ./scripts/init-submodules-if-not-present.sh ../chrome-devtools-ui ../redux-devtools-expo-dev-plugin"
"fetch:third-party": "bash ./scripts/init-submodules-if-not-present.sh ../chrome-devtools-ui ../redux-devtools-expo-dev-plugin ../radon-ide-react-query-webui"
},
"devDependencies": {
"@babel/preset-react": "^7.23.3",
Expand Down Expand Up @@ -722,5 +722,8 @@
"vscode-test": "^1.5.0",
"ws": "^8.14.2",
"xml2js": "^0.6.2"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.9.5"
}
}

0 comments on commit 8283c8a

Please sign in to comment.