forked from arduino/create-changelog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow to check project packaging is up to date
On every push and pull request that affects relevant files, check to make sure the ncc packaging is up to date.
- Loading branch information
1 parent
51174a5
commit c130260
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Check Packaging | ||
|
||
env: | ||
# See: https://github.com/actions/setup-node/#readme | ||
NODE_VERSION: 16.x | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/check-packaging-ncc-typescript-npm.yml" | ||
- "lerna.json" | ||
- "package.json" | ||
- "package-lock.json" | ||
- "tsconfig.json" | ||
- "**.[jt]sx?" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/check-packaging-ncc-typescript-npm.yml" | ||
- "lerna.json" | ||
- "package.json" | ||
- "package-lock.json" | ||
- "tsconfig.json" | ||
- "**.[jt]sx?" | ||
workflow_dispatch: | ||
repository_dispatch: | ||
|
||
jobs: | ||
check-packaging: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build project | ||
run: | | ||
npm run-script build | ||
npm run-script pack | ||
- name: Check packaging | ||
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain | ||
# Unix-style EOL. | ||
run: git diff --ignore-cr-at-eol --color --exit-code dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters