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

automatically publish extension to open vsx registry on release #161

Merged
merged 5 commits into from
Oct 24, 2023
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
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,19 @@ jobs:
uses: myrotvorets/[email protected]
id: ver

- uses: lannonbr/vsce-action@master
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishOpenVSX
with:
args: "package"

pat: ${{ secrets.OPEN_VSX_TOKEN }}

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishOpenVSX.outputs.vsixPath }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -66,6 +75,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./vscode-nushell-lang-${{ steps.ver.outputs.packageVersion }}.vsix # Need to get this version number dynamically
asset_path: ${{ steps.publishOpenVSX.outputs.vsixPath }} # Need to get this version number dynamically
asset_name: vscode-nushell-lang-${{ steps.ver.outputs.packageVersion }}.vsix
asset_content_type: application/vsix