-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 2.26 KB
/
Copy pathpublish.yaml
File metadata and controls
69 lines (67 loc) · 2.26 KB
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
on:
push:
branches:
- main
permissions:
contents: write
jobs:
bump:
runs-on: ubuntu-latest
outputs:
new_version: ${{ steps.version_bump.outputs.new_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Dependencies
run: npm install -g yarn
- name: Git Config
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Bump Version
id: version_bump
run: |
cd packages/extension
current_version=$(node -p "require('./package.json').version")
IFS='.' read -r major minor patch <<< "$current_version"
new_patch=$((patch + 1))
new_version="$major.$minor.$new_patch"
echo "new_version=$new_version" >> $GITHUB_OUTPUT
sed -i "s/\"version\": \"$current_version\"/\"version\": \"$new_version\"/" package.json
git add package.json
git commit -m "chore: bump version to $new_version"
git push
build:
needs: bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Yarn
run: npm install -g yarn
- name: Build Client
run: |
cd packages/client
yarn
yarn build
- name: Build Extension
run: |
cd packages/extension
yarn
yarn build
ls -l dist
- name: Publish
run: |
cd packages/extension
yarn deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}