Skip to content

Update pnpm/action-setup action to v2.4.1 - autoclosed #2299

Update pnpm/action-setup action to v2.4.1 - autoclosed

Update pnpm/action-setup action to v2.4.1 - autoclosed #2299

# This workflow does a build and test of all packages
name: Build and Test
on:
push:
branches:
- main
paths-ignore:
- "README.md"
pull_request:
paths-ignore:
- "README.md"
schedule:
- cron: "0 20 * * *"
jobs:
build:
runs-on: ubuntu-latest
name: Build and test
steps:
- name: checkout
uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 7.9.5
- name: setup node
uses: actions/setup-node@v2
with:
node-version: "16.*"
cache: "pnpm"
# Why do we explicitly do pnpm install here and not use "run_install: true" above in the pnpm setup?
# We need to have pnpm setup before node in order to take advantage of the inbuilt caching that is available
# in that action, and running an install as part of pnpm setup won't use the cache, so we'll explicitly
# run it here after the cache
- run: pnpm install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
- name: Check that action dist folders are up to date
run: pnpm ci:checkdist
- name: Test
run: pnpm test
publish:
runs-on: ubuntu-latest
name: Publish actions
needs: build
# Only run publishing on commits that perform versioning
if: ${{ startsWith(github.event.commits[0].message, 'Version Packages') }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: 7.9.5
- name: setup node
uses: actions/setup-node@v2
with:
node-version: "16.*"
cache: "pnpm"
# Why do we explicitly do pnpm install here and not use "run_install: true" above in the pnpm setup?
# We need to have pnpm setup before node in order to take advantage of the inbuilt caching that is available
# in that action, and running an install as part of pnpm setup won't use the cache, so we'll explicitly
# run it here after the cache
- run: pnpm install
- run: pnpm build
- name: Publish
uses: changesets/[email protected]
with:
publish: pnpm run ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}