Skip to content

Commit 6874788

Browse files
committed
2 parents 454b9be + f7c934a commit 6874788

File tree

4 files changed

+45
-43
lines changed

4 files changed

+45
-43
lines changed

.github/workflows/nodejs-publish.yml

-37
This file was deleted.

.github/workflows/nodejs-test.yml renamed to .github/workflows/nodejs.yml

+41-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
name: Node CI Test
2-
on: push
1+
name: Node CI
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
release:
7+
types: [published]
38

49
jobs:
510
build-test-linux:
@@ -51,6 +56,40 @@ jobs:
5156
npm test
5257
shell: pwsh
5358

59+
publish:
60+
if: github.event_name == 'release' && github.event.type == 'published'
61+
runs-on: ubuntu-18.04
62+
63+
strategy:
64+
matrix:
65+
node-version: [12.x]
66+
67+
steps:
68+
- uses: actions/checkout@v1
69+
- name: Use Node.js ${{ matrix.node-version }}
70+
uses: actions/setup-node@v1
71+
with:
72+
node-version: ${{ matrix.node-version }}
73+
- name: Install deps
74+
if: github.event_name == 'release' && github.event.type == 'published'
75+
run: |
76+
npm install -g vsce
77+
npm ci
78+
- name: Package extension
79+
if: github.event_name == 'release' && github.event.type == 'published'
80+
run: |
81+
tag=${GITHUB_REF#refs/tags/}
82+
echo "Setting package version $tag"
83+
npm --no-git-tag-version version "$tag"
84+
vsce package
85+
- name: Publish extension to marketplace
86+
if: github.event_name == 'release' && github.event.type == 'published'
87+
env:
88+
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
89+
run: |
90+
vsce publish -p "$AZURE_TOKEN"
91+
92+
5493
# build-test-macos:
5594
# runs-on: macOS-10.14
5695

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"devDependencies": {
164164
"@types/glob": "^7.1.1",
165165
"@types/mocha": "^5.2.7",
166-
"@types/node": "^12.11.1",
166+
"@types/node": "^12.11.7",
167167
"glob": "^7.1.4",
168168
"mocha": "^6.2.2",
169169
"prettier": "^1.18.2",

0 commit comments

Comments
 (0)