Skip to content

Commit e513ed5

Browse files
committed
ci: create workflows for deploy
1 parent b833215 commit e513ed5

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v1
15+
16+
- run: npm install && mkdir -p ./bin
17+
18+
- run: npm run package
19+
20+
- uses: actions/create-release@v1
21+
id: create_release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: ${{ github.ref }}
27+
draft: true
28+
29+
- uses: actions/upload-release-asset@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
upload_url: ${{ steps.create_release.outputs.upload_url }}
34+
asset_path: ./bin/omni.vsix
35+
asset_name: omni.vsix
36+
asset_content_type: application/octet-stream

.github/workflows/deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Deploy Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
- run: npm install
15+
- env:
16+
VSCE_PUBLISHER_TOKEN: ${{ secrets.VSCE_PUBLISHER_TOKEN }}
17+
run: npm run vsce-publish -- -p $VSCE_PUBLISHER_TOKEN

0 commit comments

Comments
 (0)