Skip to content

Commit

Permalink
Check package.json files up-to-date before publish
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaHydrae committed Feb 2, 2025
1 parent f734f0c commit 3306b13
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ jobs:
- name: Lint Rust code
run: cargo clippy

check-package-json-files:
name: Check package.json files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Update package.json files
run: npm run build:package
- name: Ensure there are no uncommitted changes
run: |
git status --porcelain
test -z "$(git status --porcelain)"
build:
name: Build ${{ matrix.settings.target }} with node@22
runs-on: ${{ matrix.settings.host }}
Expand Down Expand Up @@ -313,6 +332,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- lint
- check-package-json-files
- test-macos-binding
- test-linux-x64-gnu-binding
# - test-linux-x64-musl-binding
Expand All @@ -336,6 +356,10 @@ jobs:
- name: List packages
run: ls -R ./npm
shell: bash
- name: Ensure there are no uncommitted changes
run: |
git status --porcelain
test -z "$(git status --porcelain)"
- name: Publish
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
Expand Down

0 comments on commit 3306b13

Please sign in to comment.