-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (40 loc) · 1.18 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
name: Publish VSCode Extension
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Extension
run: npm run package
- name: Package Extension
run: npm run vsce-package
- name: Publish Extension
if: success() && startsWith(github.ref, 'refs/tags/')
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Generate Changelog
if: success() && startsWith(github.ref, 'refs/tags/')
run: |
git log $(git describe --tags --abbrev=0)..HEAD --oneline > CHANGELOG.txt
cat CHANGELOG.txt
- name: Create GitHub Release
if: success() && startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: zenml.vsix
bodyFile: CHANGELOG.txt
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}