-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (49 loc) · 1.41 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
name: Release
on:
workflow_dispatch: null
push:
tags:
- v*.*.*
env:
NODE_VERSION: 18
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Set up NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn package
- name: Collect version information
run: |
shopt -s failglob # print a warning if a glob does not match anything
set_var() {
echo $1="$2"
echo $1="$2" >> $GITHUB_ENV
declare -g $1="$2"
}
set_var VSIX_FILE $(eval echo keep-a-changelog-*.vsix)
set_var VERSION $(echo ${VSIX_FILE%.*} | cut -d- -f4)
- name: Install changelog parser
uses: taiki-e/install-action@parse-changelog
- name: Parse changelog
run: parse-changelog CHANGELOG.md ${{ env.VERSION }} > changes.md
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: changes.md
files: ${{ env.VSIX_FILE }}
- name: Publish
run: yarn publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}