Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace husky with pre-commit ensure dist integrity #515

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Action
on:
workflow_dispatch:
inputs:
ref:
description: The branch
type: string
default: master
required: true
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: |
npm ci
- name: Build Action
run: |
npm run build
- name: Update dist
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add ./dist &&
git commit -m "Update dist"
git push origin HEAD:${{ inputs.ref }}
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,26 @@ jobs:
- run: npm run lint
- run: npm run test

dist-integrity:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Build action
run: |
npm ci &&
npm run build
- name: Dist Integrity Check
run: |
git diff --quiet dist

automerge:
needs: build
needs:
- build
- dist-integrity
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

Loading