Skip to content

Add ability to run action as a dry-run #3

Add ability to run action as a dry-run

Add ability to run action as a dry-run #3

Workflow file for this run

name: Build dist
on:
push:
branches:
- main
paths:
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
permissions:
contents: write
jobs:
build:
name: Build and commit dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Commit dist/
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add dist/
git diff --staged --quiet || git commit -m "chore: rebuild dist [skip ci]"
git push