Skip to content

Commit

Permalink
Add CI workflow to check project packaging is up to date
Browse files Browse the repository at this point in the history
On every push and pull request that affects relevant files, check to make sure the ncc packaging is up to date.
  • Loading branch information
MatteoPologruto authored and per1234 committed Oct 20, 2024
1 parent 51174a5 commit c130260
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/check-packaging-ncc-typescript-npm.yml
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Create Changelog

[![Actions Status](https://github.com/arduino/create-changelog/workflows/Test%20Action/badge.svg)](https://github.com/arduino/create-changelog/actions)
[![Check Packaging status](https://github.com/arduino/create-changelog/actions/workflows/check-packaging-ncc-typescript-npm.yml/badge.svg)](https://github.com/arduino/create-changelog/actions/workflows/check-packaging-ncc-typescript-npm.yml)

This actions is an highly opinionated tool that creates changelogs from the git repository commit history.

Expand Down

0 comments on commit c130260

Please sign in to comment.