feat: Affected packages (#10) #170
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
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Get node version | |
id: node | |
run: echo "::set-output name=version::$(node -v)" | |
- name: Get node_modules cache | |
uses: actions/cache@v4 | |
id: node_modules | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Print Environment Info | |
run: yarn nx report | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v4 | |
- run: | | |
echo "BASE: ${{ env.NX_BASE }}" | |
echo "HEAD: ${{ env.NX_HEAD }}" | |
- name: Build affected packages | |
run: yarn nx affected -t build --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} |