Skip to content

Bump @types/node from 20.11.17 to 22.5.2 #610

Bump @types/node from 20.11.17 to 22.5.2

Bump @types/node from 20.11.17 to 22.5.2 #610

Workflow file for this run

# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
actions: read
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set Node.js 20.x
uses: actions/[email protected]
with:
node-version: 20.x
- name: Install dependencies
run: yarn install
- name: Rebuild the dist/ directory
run: |
yarn run build
yarn run package
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
- name: diff debug # TODO figure out why this returning files, when git status says there's nothing in the working tree
run: git diff-index --ignore-submodules HEAD
- name: git status
id: git-status
run: git status
- name: stage dist if modified
if: steps.git-check.outputs.modified == 'true'
run: git add dist/.
- name: Commit changes in dist, if any
if: steps.git-check.outputs.modified == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git fetch origin
git commit -m "Updating build files in dist/" || echo "Nothing to commit"
git push origin ${{github.event.pull_request.head.ref }}