Skip to content

Commit 921e3d3

Browse files
authored
Merge pull request #419 from jneira/gha
Release and publish extension using github actions
2 parents c661eab + fdff19c commit 921e3d3

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
name: Deploy Extension
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 12
14+
- run: npm ci
15+
- name: Publish to Visual Studio Marketplace
16+
id: publishToVSMarketplace
17+
uses: HaaLeo/publish-vscode-extension@v0
18+
with:
19+
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
20+
registryUrl: https://marketplace.visualstudio.com
21+
- name: Publish to Open VSX Registry
22+
id: publishToOpenVSX
23+
continue-on-error: true
24+
uses: HaaLeo/publish-vscode-extension@v0
25+
with:
26+
pat: ${{ secrets.OPEN_VSX_TOKEN }}
27+
- name: Upload extension vsix
28+
uses: actions/upload-release-asset@v1.0.2
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
upload_url: ${{ github.event.release.upload_url }}
33+
asset_path: ${{ steps.publishToVSMarketplace.outputs.vsixPath }}
34+
asset_name: haskell-${{ github.event.release.tag_name }}.vsix
35+
asset_content_type: application/vsix

0 commit comments

Comments
 (0)