Skip to content

Bump tsx from 4.20.1 to 4.20.2 #106

Bump tsx from 4.20.1 to 4.20.2

Bump tsx from 4.20.1 to 4.20.2 #106

Workflow file for this run

# In JavaScript actions, `dist/` is a special directory. When you reference
# an action with the `uses:` property, `dist/index.js` is the code that will be
# run. For this project, the `dist/index.js` file is transpiled from other
# source files. This workflow ensures the `dist/` directory contains the
# expected transpiled code.
#
# If this workflow is run from a feature branch, it will act as an additional CI
# check and fail if the checked-in `dist/` directory does not match what is
# expected from the build.
name: Check Transpiled JavaScript
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
NODE_VERSION: 21
PNPM_VERSION: 9
permissions:
contents: write
jobs:
check-dist:
name: Check dist folder
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup PNPM
uses: pnpm/action-setup@v4.1.0
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Commit distribution
if: github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'Bump') && github.actor == 'dependabot[bot]'
run: |
git add dist
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
[[ -n "$(git status -s)" ]] && git commit -am "Automated dist build"
git push
- name: Compare Directories
id: diff
run: |
if [ ! -d dist/ ]; then
echo "Expected dist/ directory does not exist. See status below:"
ls -la ./
exit 1
fi
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
name: Upload Artifact
id: upload
uses: actions/upload-artifact@v4.6.2
with:
name: dist
path: dist/