-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(CI): Build JS packages w/o artifacts
- Loading branch information
Showing
3 changed files
with
54 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
check_yarn_lock: | ||
runs-on: ubuntu-latest | ||
name: Check yarn.lock | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: changed-yarn-lock | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
files: yarn.lock | ||
outputs: | ||
yarn_lock_changed: ${{ steps.changed-yarn-lock.outputs.any_changed }} | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build JS packages | ||
needs: check_yarn_lock | ||
if: ${{ needs.check_yarn_lock.outputs.yarn_lock_changed }} | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
persist-credentials: false | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: "yarn" | ||
- name: Restore node_modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-modules | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: YARN build | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters