Skip to content

Commit 54f0286

Browse files
committed
2 parents a49647e + 4c20584 commit 54f0286

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Release
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the develop branch
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
Publish-and-release:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 16.13.0
25+
- name: Save release version to outputs
26+
id: save_release_version
27+
run: echo ::set-output name=version::$(node -pe "require('./package.json').version")
28+
- name: Installing modules
29+
id: install_modules
30+
run: |
31+
npm install
32+
- name: Publish To Marketplace
33+
id: publish
34+
run: ./node_modules/.bin/vsce publish
35+
env:
36+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
37+
- name: Publish To Open VSX
38+
id: publish_open_vsx
39+
run: npx ovsx publish -p ${{ secrets.OPEN_VSX_TOKEN }}
40+
- name: Create a release
41+
id: release
42+
uses: actions/create-release@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag_name: v${{ steps.save_release_version.outputs.version }}
47+
release_name: v${{ steps.save_release_version.outputs.version }}
48+
body: v${{ steps.save_release_version.outputs.version }}
49+
draft: false
50+
prerelease: false

0 commit comments

Comments
 (0)