Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script for publishing to OpenVsx #496

Merged
merged 6 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@ jobs:
- name: "Prepare: Checkout Repository"
uses: actions/checkout@v2
- name: "Prepare: Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: v16.x
node-version: v22.x
#- name: "Prepare: Setup sonarqube"
# uses: warchant/setup-sonar-scanner@v1
#- run: npm install -g npm@latest
- run: npm install -g [email protected]
- run: npm install
- run: npm run lint
- run: npm run vscode:prepublish
#- run: npm test
# env:
# CI: true
- name: "Prepare: Package VSCode Extension"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: v16.x
#- run: npm install -g npm@latest
- run: npm install -g [email protected]
- run: npm install -g [email protected]
node-version: v22.x
- run: npm install -g @vscode/[email protected]
- run: vsce package --out dist/


Expand All @@ -43,7 +39,7 @@ jobs:
# -Dsonar.login=${{ secrets.SONAR_TOKEN }}

- name: "Upload Artifact: VSIX Packages"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: package
path: dist/*.vsix
Expand Down Expand Up @@ -128,11 +124,17 @@ jobs:
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

- run: npm install -g vsce@1.96.1
- run: npm install -g @vscode/vsce@2.15.0
- run: vsce publish -p "${MARKETPLACE_TOKEN}" --packagePath dist/${PACKAGE_NAME}-${VERSION}.vsix
env:
# Note: Marketplace Token according to:
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token
# The token is only valid for a limited time - renewal might be required.
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}
VERSION: ${{ steps.get_version.outputs.VERSION }}

- run: npm install -g [email protected]
- run: ovsx publish -p "${OPENVSX_NAMESPACE_TOKEN}" --packagePath dist/${PACKAGE_NAME}-${VERSION}.vsix
env:
OPENVSX_NAMESPACE_TOKEN: ${{ secrets.OPENVSX_NAMESPACE_TOKEN }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
Loading