-
Notifications
You must be signed in to change notification settings - Fork 130
71 lines (63 loc) · 1.98 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
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
68
69
70
71
name: release
# runs when a tag v* is pushed
# releases the extension to GitHub and the vscode marketplace
on:
push:
tags: ["v*"]
env:
SCRIPT_DIR: ./.github/scripts
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: node $SCRIPT_DIR/enableWebpack.js
- run: yarn install
- uses: lannonbr/vsce-action@master
with:
args: "package"
- name: Identify output file # can be retrieved as steps.filenames.outputs.file_out
id: filenames
run: echo "::set-output name=file_out::$(ls | grep "^.*\.vsix$" | head -1)"
- uses: actions/upload-artifact@v3
with:
name: ${{ steps.filenames.outputs.file_out }}
path: ${{ steps.filenames.outputs.file_out }}
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/[email protected]
with:
path: "artifacts/"
- name: Get version from tag
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\/v/}
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
files: "artifacts/*/*"
prerelease: false
draft: false
publish:
name: Publish
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: node $SCRIPT_DIR/enableWebpack.js
- run: yarn install
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}