-
-
Notifications
You must be signed in to change notification settings - Fork 155
92 lines (73 loc) · 2.44 KB
/
packages.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Deploy Packages
on:
push:
tags:
- '*'
jobs:
deploy-packages:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
- name: Install Dependencies
run: pnpm install
- name: Check
run: |
pnpm -r check:prettier
pnpm -r check:eslint
# - name: Test
# run: |
# pnpm exec playwright install chromium
# pnpm -r test
- name: Gitversion
id: gitversion
uses: gittools/actions/gitversion/execute@v0
- name: Build
run: |
pnpm -F './packages/**/*' build
- name: Copy README
run: cp ./README.md packages/react/xr
- name: Set Version
run: pnpm -F './packages/**/*' exec json -f "package.json" -I -e 'this.version = "${{ steps.gitversion.outputs.fullSemVer }}"'
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
- id: check-pointer-events
uses: PostHog/check-package-version@v2
with:
path: ./packages/pointer-events/
- name: Deploy pointer events Package
if: steps.check-pointer-events.outputs.is-new-version == 'true'
working-directory: ./packages/pointer-events
run: pnpm publish --access public --no-git-checks --tag latest
- id: check-xr-vanilla
uses: PostHog/check-package-version@v2
with:
path: ./packages/xr/
- name: Deploy XR Vanilla Package
if: steps.check-xr-vanilla.outputs.is-new-version == 'true'
working-directory: ./packages/xr
run: pnpm publish --access public --no-git-checks --tag latest
- id: check-xr-react
uses: PostHog/check-package-version@v2
with:
path: ./packages/react/xr/
- name: Deploy XR React Package
if: steps.check-xr-react.outputs.is-new-version == 'true'
working-directory: ./packages/react/xr
run: pnpm publish --access public --no-git-checks --tag latest