Skip to content

ci-single.yml

ci-single.yml #23

Workflow file for this run

name: ci-single.yml
on:
#push:
# branches: ['main']
#pull_request:
# branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Git config user
run: |
git config --local user.name "Rushbot"
git config --local user.email "rushbot@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore PNPM from GHA cache
id: pnpm-cache-restore
uses: actions/cache/restore@v3
with:
path: ~/.rush-pnpm-store
key: v1003-pnpm-${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
# If we can't find a match, restore the latest cache entry
restore-keys: |
v1003-pnpm-${{ runner.os }}-
- name: Set RUSH_PNPM_STORE_PATH
run: echo "RUSH_PNPM_STORE_PATH=~/.rush-pnpm-store" >> $GITHUB_ENV
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Save PNPM to GHA cache
if: steps.pnpm-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ~/.rush-pnpm-store
key: v1003-pnpm-${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
- name: Rush build (install-run-rush)
run: node common/scripts/install-run-rush.js build --verbose --production --timeline
env:
# Prevent time-based browserslist update warning
# See https://github.com/microsoft/rushstack/issues/2981
BROWSERSLIST_IGNORE_OLD_DATA: 1
RUSH_BUILD_CACHE_WRITE_ALLOWED: 1
RUSH_BUILD_CACHE_CREDENTIAL: ${{ secrets.RUSH_BUILD_CACHE_CREDENTIAL }}