|
| 1 | +name: Deploy Beta Packages |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - develop |
| 7 | + |
| 8 | +jobs: |
| 9 | + deploy-packages: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + contents: read |
| 13 | + steps: |
| 14 | + - name: Checkout code |
| 15 | + uses: actions/checkout@v3 |
| 16 | + with: |
| 17 | + fetch-depth: 0 |
| 18 | + |
| 19 | + - name: Setup Node |
| 20 | + uses: actions/setup-node@v3 |
| 21 | + with: |
| 22 | + node-version: 18 |
| 23 | + |
| 24 | + - uses: pnpm/action-setup@v2 |
| 25 | + name: Install pnpm |
| 26 | + with: |
| 27 | + version: 8 |
| 28 | + run_install: false |
| 29 | + |
| 30 | + - uses: gittools/actions/gitversion/setup@v0 |
| 31 | + with: |
| 32 | + versionSpec: '5.x' |
| 33 | + |
| 34 | + - name: Install Dependencies |
| 35 | + run: pnpm install |
| 36 | + |
| 37 | + - name: Check |
| 38 | + run: | |
| 39 | + pnpm -r check:prettier |
| 40 | + pnpm -r check:eslint |
| 41 | +
|
| 42 | + # - name: Test |
| 43 | + # run: | |
| 44 | + # pnpm exec playwright install chromium |
| 45 | + # pnpm -r test |
| 46 | + |
| 47 | + - name: Gitversion |
| 48 | + id: gitversion |
| 49 | + uses: gittools/actions/gitversion/execute@v0 |
| 50 | + |
| 51 | + - name: Build |
| 52 | + run: | |
| 53 | + pnpm -F './packages/**/*' build |
| 54 | +
|
| 55 | + - name: Copy README |
| 56 | + run: cp ./README.md packages/react/xr |
| 57 | + |
| 58 | + - name: Set Version |
| 59 | + run: pnpm -F './packages/**/*' exec json -f "package.json" -I -e 'this.version = "${{ steps.gitversion.outputs.fullSemVer }}"' |
| 60 | + |
| 61 | + - name: Set publishing config |
| 62 | + run: pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" |
| 63 | + |
| 64 | + - id: check-pointer-events |
| 65 | + uses: PostHog/check-package-version@v2 |
| 66 | + with: |
| 67 | + path: ./packages/pointer-events/ |
| 68 | + |
| 69 | + - name: Deploy pointer events Package |
| 70 | + if: steps.check-pointer-events.outputs.is-new-version == 'true' |
| 71 | + working-directory: ./packages/pointer-events |
| 72 | + run: pnpm publish --access public --no-git-checks --tag alpha |
| 73 | + |
| 74 | + |
| 75 | + - id: check-handle-vanilla |
| 76 | + uses: PostHog/check-package-version@v2 |
| 77 | + with: |
| 78 | + path: ./packages/handle/ |
| 79 | + |
| 80 | + - name: Deploy Handle Vanilla Package |
| 81 | + if: steps.check-handle-vanilla.outputs.is-new-version == 'true' |
| 82 | + working-directory: ./packages/handle |
| 83 | + run: pnpm publish --access public --no-git-checks --tag alpha |
| 84 | + |
| 85 | + - id: check-xr-vanilla |
| 86 | + uses: PostHog/check-package-version@v2 |
| 87 | + with: |
| 88 | + path: ./packages/xr/ |
| 89 | + |
| 90 | + - name: Deploy XR Vanilla Package |
| 91 | + if: steps.check-xr-vanilla.outputs.is-new-version == 'true' |
| 92 | + working-directory: ./packages/xr |
| 93 | + run: pnpm publish --access public --no-git-checks --tag alpha |
| 94 | + |
| 95 | + - id: check-handle-react |
| 96 | + uses: PostHog/check-package-version@v2 |
| 97 | + with: |
| 98 | + path: ./packages/react/handle/ |
| 99 | + |
| 100 | + - name: Deploy Handle React Package |
| 101 | + if: steps.check-handle-react.outputs.is-new-version == 'true' |
| 102 | + working-directory: ./packages/react/handle |
| 103 | + run: pnpm publish --access public --no-git-checks --tag alpha |
| 104 | + |
| 105 | + - id: check-xr-react |
| 106 | + uses: PostHog/check-package-version@v2 |
| 107 | + with: |
| 108 | + path: ./packages/react/xr/ |
| 109 | + |
| 110 | + - name: Deploy XR React Package |
| 111 | + if: steps.check-xr-react.outputs.is-new-version == 'true' |
| 112 | + working-directory: ./packages/react/xr |
| 113 | + run: pnpm publish --access public --no-git-checks --tag alpha |
0 commit comments