build(deps/dev): bump sort-package-json from 2.15.1 to 3.0.0 #1834
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request_target: | |
branches: | |
- master | |
jobs: | |
# Configure the commit SHA to use. | |
configure: | |
name: Configure | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 2 | |
outputs: | |
commit-sha: ${{ env.COMMIT_SHA }} | |
steps: | |
- name: Evaluate commit | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then | |
echo "PR is #${{ github.event.number }}..." | |
echo "PR Head SHA is ${{ github.event.pull_request.head.sha }}..." | |
echo "COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
else | |
echo "Head SHA is ${{ github.sha }}..." | |
echo "COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV | |
fi | |
build: | |
name: Check & Build | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.configure.outputs.commit-sha }} | |
- name: Setup Node | |
uses: abinnovision/actions@setup-node-v1 | |
- name: Install dependencies | |
run: yarn install --immutable | |
# Lint & Format | |
- name: Check | |
run: yarn check | |
# Build | |
- name: Build | |
run: yarn build | |
test-e2e: | |
name: Test / E2E Cypress (${{ matrix.browser }}) | |
strategy: | |
matrix: | |
browser: [chromium, firefox, webkit] | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.configure.outputs.commit-sha }} | |
- name: Setup Node | |
uses: abinnovision/actions@setup-node-v1 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Install Playwright | |
run: yarn playwright install --with-deps | |
- name: Run tests | |
run: yarn test-integration --browser ${{ matrix.browser }} | |
release: | |
name: Release | |
needs: | |
- configure | |
- build | |
- test-e2e | |
uses: abinnovision/workflows/.github/workflows/release-please.yaml@master | |
secrets: inherit | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- release | |
if: needs.release.outputs.releases_created | |
permissions: | |
contents: "write" | |
id-token: "write" | |
packages: "write" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.configure.outputs.commit-sha }} | |
- name: Setup Node | |
uses: abinnovision/actions@setup-node-v1 | |
- name: Install | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Publish | |
run: | | |
# Publish to NPM | |
yarn config set -H npmPublishRegistry "https://registry.npmjs.org" | |
yarn config set -H npmRegistryServer "https://registry.npmjs.org" | |
yarn config set -H npmAuthToken "${{ secrets.NPM_AUTH_TOKEN }}" | |
yarn npm publish --access public |