This is an action, to rebuild typescript actions when dependencies change and the dist folder needs to be updated.
MIT License
This is an attempt to reduce maintenace overhead of maintaining dependencies in github typescript actions. When using the actions/typescript-acton template it introduces a check that verifies the dist folder matches the expected result, this is a great check but it means anytime there is a dependabot or rennovatebot PR that introduces a dependency that changes the build result.... you have to manually checkout the branch, run the npm commands to get the compiled JS in sync again, and then merge it. This action automates that when it detects a build results in a dirty source tree.
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
sync-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
persist-credentials: true
- uses: bryopsida/ts-action-builder-action@v1 #or @main if you prefer
build-and test:
runs-on: ubuntu-latest
needs:
- sync-dist
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
persist-credentials: true
- run: |
npm install
- run: |
npm run all
check-dist:
runs-on: ubuntu-latest
needs:
- sync-dist
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
persist-credentials: true
...