ci: fix failing create-release-pr job #221
Workflow file for this run
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: Build, Lint, and Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build-lint-test: | |
name: Build, Lint, and Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- 18.x | |
- 20.x | |
- 22.x | |
steps: | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- name: Get Yarn version | |
run: echo "::set-output name=YARN_VERSION::$(yarn --version)" | |
id: yarn-version | |
- run: yarn --frozen-lockfile --ignore-engines | |
- run: yarn allow-scripts | |
- run: yarn build | |
- run: yarn lint | |
# def remove before node.js v140 | |
if: "${{ !startsWith(matrix.node-version, '14') }}" | |
- run: yarn test | |
- name: Validate RC changelog | |
if: ${{ startsWith(github.head_ref, 'release/') }} | |
run: yarn auto-changelog validate --rc | |
- name: Validate changelog | |
if: ${{ !startsWith(github.head_ref, 'release/') }} | |
run: yarn auto-changelog validate | |
- name: Require clean working directory | |
shell: bash | |
run: | | |
if ! git diff --exit-code; then | |
echo "Working tree dirty after building" | |
exit 1 | |
fi | |
all-jobs-pass: | |
name: All jobs pass | |
runs-on: ubuntu-latest | |
needs: | |
- build-lint-test | |
steps: | |
- run: echo "Great success!" |