Skip to content

Merge pull request #224 from AndreasNel/dependabot/github_actions/hma… #214

Merge pull request #224 from AndreasNel/dependabot/github_actions/hma…

Merge pull request #224 from AndreasNel/dependabot/github_actions/hma… #214

Workflow file for this run

name: dist
on:
push:
branches: master
paths:
- '**.js'
- '**.yml'
- 'package.json'
- '!dist/**'
jobs:
create-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.DIST_TOKEN }}
- id: dist
name: Check Dist Exists
run: |
npm i
npm run-script package
git config user.name "Github Action"
git config user.email "action@github.com"
echo ::set-output name=filename::$(git diff --name-only dist/index.js)
- name: Commit Dist
if: steps.dist.outputs.filename == 'dist/index.js'
run: git commit -m "Auto-generate dist" -a
- name: Push Dist File
if: steps.dist.outputs.filename == 'dist/index.js'
uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.DIST_TOKEN }}