Skip to content

Commit e5f6280

Browse files
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.
1 parent bb6dbba commit e5f6280

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Check Packaging
2+
3+
env:
4+
# See: https://github.com/actions/setup-node/#readme
5+
NODE_VERSION: 16.x
6+
7+
on:
8+
push:
9+
paths:
10+
- ".github/workflows/check-packaging-ncc-typescript-npm.yml"
11+
- "lerna.json"
12+
- "package.json"
13+
- "package-lock.json"
14+
- "tsconfig.json"
15+
- "**.[jt]sx?"
16+
pull_request:
17+
paths:
18+
- ".github/workflows/check-packaging-ncc-typescript-npm.yml"
19+
- "lerna.json"
20+
- "package.json"
21+
- "package-lock.json"
22+
- "tsconfig.json"
23+
- "**.[jt]sx?"
24+
workflow_dispatch:
25+
repository_dispatch:
26+
27+
jobs:
28+
check-packaging:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: ${{ env.NODE_VERSION }}
39+
40+
- name: Install dependencies
41+
run: npm install
42+
43+
- name: Build project
44+
run: |
45+
npm run-script build
46+
npm run-script pack
47+
48+
- name: Check packaging
49+
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
50+
# Unix-style EOL.
51+
run: git diff --ignore-cr-at-eol --color --exit-code dist

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Create Changelog
22

33
[![Actions Status](https://github.com/arduino/create-changelog/workflows/Test%20Action/badge.svg)](https://github.com/arduino/create-changelog/actions)
4+
[![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)
45

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

0 commit comments

Comments
 (0)