Skip to content

Commit fd66cb8

Browse files
committed
feat: update CI workflow to install yq and modify versioning process
1 parent 6d85a34 commit fd66cb8

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,24 @@ jobs:
2828
cache: 'pnpm'
2929

3030
- name: Install dependencies
31-
run: pnpm install
31+
run: |
32+
apt update
33+
apt install -y yq
34+
35+
pnpm install
36+
37+
- name: Download specification
38+
run: curl -L -o openapi.yaml https://vrchat.community/openapi.yaml
39+
40+
- name: Build
41+
run: pnpm build
42+
43+
- name: Write version
44+
run: |
45+
VERSION=$(yq '.info.version' openapi.yaml | tr -d '"')
46+
jq --arg version "$VERSION" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
3247
3348
- run: |
34-
pnpm publish --provenance
49+
pnpm publish --provenance --tag next --publish-branch v2 --no-git-checks
3550
env:
3651
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
src/generated
3-
dist
3+
dist
4+
openapi.yaml

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vrchat",
3-
"version": "1.19.4-alpha.0",
3+
"version": "2.0.0",
44
"type": "module",
55
"description": "",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)