-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (56 loc) · 1.67 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
68
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: |
yarn install
- name: Build
env:
CROWDIN_API_TOKEN: '${{ secrets.CROWDIN_API_TOKEN }}'
run: |
yarn run package
- name: grep asset name and tag name
run: |
NAME="$(ls | grep 'cactbot-highlight-.*.vsix')"
echo "ASSET_NAME=$NAME" >> $GITHUB_ENV
TAG="$(echo '${{ github.ref }}' | sed 's/refs\/tags\///g')"
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Cactbot Highlight ${{ env.TAG }}
body: ''
draft: true
files: |
${{ env.ASSET_NAME }}
- name: Publish to VS Market
run: |
yarn vsce publish -p ${{ secrets.AZURE_TOKEN }}
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}