-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.4 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
name: Publish extension
on:
push:
branches:
- main
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
jobs:
release:
name: Create a Release
runs-on: ubuntu-latest
if: startsWith(github.event.head_commit.message, '🚀')
steps:
- uses: actions/checkout@v2
- name: Store tag name
run: |
tag_name="$(echo $COMMIT_MESSAGE | grep -oP "v\d+.\d+.\d+")"
echo $tag_name
echo "TAG_NAME=$tag_name" >> $GITHUB_ENV
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: ${{ env.TAG_NAME }}
body: See [CHANGELOG](https://github.com/juzerzarif/terra-wdio-helper/blob/main/CHANGELOG.md) for changes
publish:
name: Publish VSCode Extension
runs-on: ubuntu-latest
if: startsWith(github.event.head_commit.message, '🚀')
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Install vsce
run: npm i -g vsce
- name: Publish extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: vsce publish -p $VSCE_PAT