Skip to content

Use create-pull-request action for dist updates #107

Use create-pull-request action for dist updates

Use create-pull-request action for dist updates #107

Workflow file for this run

name: Package
on:
pull_request:
jobs:
build:
name: Package distribution file
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Package
run: |
npm ci
npm test
npm run all
- name: Commit to PR
if: github.actor == 'dependabot[bot]'
run: |
git config --global user.name "GitHub Actions"
git add dist/
git commit -m "(chore) updating dist" || echo "No changes to commit"
git push
- name: Check dist is up-to-date
if: github.actor != 'dependabot[bot]'
run: |
git diff --exit-code dist/