-
Notifications
You must be signed in to change notification settings - Fork 2.9k
57 lines (47 loc) · 1.71 KB
/
Copy pathpublish-pr-releases.yml
File metadata and controls
57 lines (47 loc) · 1.71 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
name: Pull Request Prerelease
on:
pull_request:
push:
branches:
- "**"
tags:
- "!**"
jobs:
prerelease:
name: Pull Request Prerelease
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ">=23.6.0"
- name: Check if any files in codegen/ changed
id: changed-files-codegen
uses: karpikpl/list-changed-files-action@1.1.4
with:
file-filter: "codegen/**"
- name: Check if any files in scripts/codemods/ac3-to-ac4/ changed
id: changed-files-codemod
uses: karpikpl/list-changed-files-action@1.1.4
with:
file-filter: "scripts/codemods/ac3-to-ac4/**"
- name: Install dependencies with cache
uses: bahmutov/npm-install@v1
- name: Build AC
run: npm run build
- name: Build Codegen
if: steps.changed-files-codegen.outputs.changed_files != ''
run: npm run build
working-directory: "./codegen"
- name: Build Codemod
if: steps.changed-files-codemod.outputs.changed_files != ''
run: npm run build
working-directory: "./scripts/codemods/ac3-to-ac4"
- name: Build and publish to pkg.pr.new
env:
PACKAGE_CODEGEN: ${{ steps.changed-files-codegen.outputs.changed_files != '' && './codegen' || '' }}
PACKAGE_CODEMOD: ${{ steps.changed-files-codemod.outputs.changed_files != '' && './scripts/codemods/ac3-to-ac4' || '' }}
# skipping --compact for a moment as there is an unreleased package
run: npx pkg-pr-new publish --no-template ./dist $PACKAGE_CODEGEN $PACKAGE_CODEMOD