Skip to content

Commit a1782d5

Browse files
committed
main2.md
1 parent 9ad5290 commit a1782d5

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/vsce.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: release vsix to githb.
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
cd:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout branch
12+
if: ${{ github.event_name != 'schedule' }}
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
token: ${{ secrets.CD_PAT }}
17+
ref: ${{ github.ref }}
18+
19+
- name: Setup node
20+
uses: actions/setup-node@v2.1.2
21+
with:
22+
node-version: 14
23+
24+
- name: Setup npm registry
25+
run: |
26+
echo "${{ secrets.NPMRC }}" > ~/.npmrc
27+
28+
- name: Setup project
29+
run: |
30+
npm run setup
31+
32+
- name: pack vsix
33+
id: pack-vsix
34+
uses: nick-invision/retry@v2
35+
with:
36+
timeout_minutes: 10
37+
max_attempts: 10
38+
retry_on: error
39+
command: |
40+
sleep 5
41+
cd ./packages/vscode-extension
42+
npm install
43+
npx vsce package
44+
VERSION=`ls *.vsix | awk -F '.vsix' '{print $1}'`
45+
echo "::set-output name=VERSION::$VERSION"
46+
47+
- name: release VSCode extension to github
48+
uses: marvinpinto/action-automatic-releases@latest
49+
with:
50+
repo_token: ${{ secrets.CD_PAT }}
51+
prerelease: true
52+
automatic_release_tag: ${{ steps.pack-vsix.outputs.VERSION }}
53+
files: |
54+
./packages/**/*.vsix

0 commit comments

Comments
 (0)