-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 1.93 KB
/
ci.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
72
73
74
name: Build and Publish
on:
push:
branches:
- main
- ci/*
release:
types:
- created
permissions:
contents: write
pull-requests: write
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: 8
run_install: false
shell: bash
if: runner.os == 'Linux'
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
echo store_path=${{ env.STORE_PATH }}
pnpm install && npx vsce publish -p ${{ secrets.VSCE_PAT }}
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ env.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# - run: pnpm install && pnpm run package
# if: runner.os == 'Linux'
release-please:
runs-on: ubuntu-latest
needs: build
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: mcap-cli-vscode-${{ steps.release.outputs.tag_name }}
bump-patch-for-minor-pre-major: true
- name: Publish and Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
pnpm i
ls -al
npx vsce package
npx vsce publish -p ${{ secrets.VSCE_PAT }}
echo tag_name: ${{ steps.release.outputs.tag_name }}
gh release upload ${{ steps.release.outputs.tag_name }} ./mcap-cli-vscode-${{ steps.release.outputs.tag_name }}.vsix