-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 1.71 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
name: Release
on:
workflow_dispatch:
inputs:
releaseType:
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- run: |
git status -s
if: success() && matrix.os == 'ubuntu-latest'
# - name: Package
# if: success() && matrix.os == 'ubuntu-latest'
# run: |
# npm run package ${RELEASE_TYPE}
# echo "packageFile=$(ls *.vsix)" >> $GITHUB_ENV
# env:
# RELEASE_TYPE: ${{ inputs.releaseType }}
# - name: Publish
# if: success() && matrix.os == 'ubuntu-latest'
# run: |
# npm run publish -i ${VSIX_PATH}
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
# VSIX_PATH: ${{ env.packageFile }}
# - name: Push tag
# if: success() && matrix.os == 'ubuntu-latest'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# git config user.name "GitHub Actions"
# git config user.email "[email protected]"
# git push --tags
# - name: Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# uses: softprops/action-gh-release@v2
# if: success() && matrix.os == 'ubuntu-latest'
# with:
# files: |
# ${{ env.packageFile }}