-
Notifications
You must be signed in to change notification settings - Fork 348
56 lines (49 loc) · 1.59 KB
/
typescript-packages-publish-experimental.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
name: Publish Any Pull Request
# TODO: Only publish on pull requests by arize team members
on:
pull_request:
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
workflow_file: ${{ steps.filter.outputs.workflow_file }}
phoenix-client: ${{ steps.filter.outputs.phoenix-client }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
phoenix-client:
- 'js/packages/phoenix-client/**'
workflow_file:
- '.github/workflows/typescript-packages-publish-experimental.yml'
publish-experimental-packages:
needs: changes
if: ${{ needs.changes.outputs.phoenix-client == 'true' || needs.changes.outputs.workflow_file == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# workaround for broken corepack https://github.com/nodejs/corepack/issues/612
- run: |
npm i -g corepack@latest
corepack enable
working-directory: ./js
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
working-directory: ./js
run: pnpm install
- name: Build
working-directory: ./js
run: pnpm -r build
- name: Publish
working-directory: ./js
run: pnpx pkg-pr-new publish ./packages/phoenix-client