-
Notifications
You must be signed in to change notification settings - Fork 29
67 lines (57 loc) · 1.9 KB
/
publish.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish Extension
on:
workflow_dispatch:
pull_request:
types: [closed]
jobs:
deploy:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true &&
github.event.pull_request.title == 'Update version and CHANGELOG for release')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Variables
id: set_variables
run: |
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'yarn'
- run: yarn install
- run: yarn build
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: dvc.vsix
path: ./extension/dvc.vsix
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
extensionFile: './extension/dvc.vsix'
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
extensionFile: './extension/dvc.vsix'
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Get Most Recent Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
- name: Create Github Release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.changelog_reader.outputs.changes }}
commit: ${{ steps.set_variables.outputs.commit }}
name: ${{ steps.changelog_reader.outputs.version }}
tag: ${{ steps.changelog_reader.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}