Skip to content

Commit 42d9f23

Browse files
committed
chore: update builds, github actions
1 parent beb8276 commit 42d9f23

14 files changed

Lines changed: 344 additions & 32 deletions

File tree

.github/actions/prepare/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
description: Prepares the repo for a typical CI job
2+
3+
name: Prepare
4+
inputs:
5+
node-version: # id of input
6+
description: 'Node.js version'
7+
required: false
8+
default: '24'
9+
10+
runs:
11+
steps:
12+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
13+
with:
14+
node-version: ${{ inputs.node-version }}
15+
- name: Install dependencies
16+
uses: bahmutov/npm-install@3e063b974f0d209807684aa23e534b3dde517fd9 # v1.11.2
17+
with:
18+
install-command: npm ci --foreground-scripts
19+
using: composite

.github/actions/publish/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
description: Publish to npm
3+
4+
inputs:
5+
token:
6+
description: 'npm token'
7+
required: true
8+
9+
runs:
10+
steps:
11+
# see https://github.com/google-github-actions/release-please-action#automating-publication-to-npm
12+
# see https://docs.npmjs.com/generating-provenance-statements
13+
- name: Checkout Repository
14+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
17+
with:
18+
node-version: 24.11.0
19+
registry-url: https://registry.npmjs.org
20+
- name: Install & Build
21+
uses: bahmutov/npm-install@3e063b974f0d209807684aa23e534b3dde517fd9 # v1.11.2
22+
- name: Publish to npm
23+
env:
24+
NODE_AUTH_TOKEN: ${{ inputs.token }}
25+
run: npm publish --provenance --access public --registry https://registry.npmjs.org
26+
shell: bash
27+
using: composite

.github/workflows/commitlint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Validate Commit Messages
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
commitlint:
9+
env:
10+
FORCE_COLOR: '1'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
- uses: ./.github/actions/prepare
16+
- name: Run commitlint
17+
uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6
18+
env:
19+
NODE_PATH: ${{ github.workspace }}/node_modules

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
permissions:
2+
contents: read
3+
4+
jobs:
5+
lint:
6+
env:
7+
FORCE_COLOR: '1'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
11+
- uses: ./.github/actions/prepare
12+
- run: npm run lint
13+
14+
name: Lint
15+
16+
on: [push, pull_request]

.github/workflows/nodejs.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ name: Node CI
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
6+
test:
7+
env:
8+
FORCE_COLOR: '1'
9+
name: Build & Test
810
runs-on: ubuntu-latest
911
strategy:
1012
matrix:
11-
node_version: [14, 16, 18]
12-
os: [ubuntu-latest]
13+
include:
14+
- node-version: '20'
15+
- node-version: '22'
16+
- node-version: '24'
1317
steps:
14-
- uses: actions/checkout@v3
15-
- name: Use Node.js ${{ matrix.node_version }}
16-
uses: actions/setup-node@v3
18+
- name: Checkout Repository
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
- uses: ./.github/actions/prepare
1721
with:
18-
version: ${{ matrix.node_version }}
19-
- name: npm install
20-
uses: bahmutov/npm-install@v1
21-
- name: test
22+
node-version: ${{ matrix.node-version }}
23+
- name: Test
2224
run: npm test
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Auto-assign PR to author
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
assign-author:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: toshimaru/auto-author-assign@16f0022cf3d7970c106d8d1105f75a1165edb516 # v2.1.1

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish to npm
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
16+
- uses: ./.github/actions/publish
17+
with:
18+
token: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
1+
name: release-please
2+
3+
concurrency:
4+
group: ${{ github.workflow }}
5+
16
on:
27
push:
38
branches:
49
- main
5-
name: release-please
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
id-token: write
15+
616
jobs:
717
release-please:
18+
name: Release Please
819
runs-on: ubuntu-latest
920
steps:
10-
- uses: google-github-actions/release-please-action@v3
11-
with:
12-
release-type: node
13-
package-name: boneskull-template
21+
- name: Create Release
22+
id: release
23+
uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
24+
- if: ${{ steps.release.outputs.release_created }}
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
# Enable for publishing
27+
#- if: ${{ steps.release.outputs.release_created }}
28+
# uses: ./.github/actions/publish
29+
# with:
30+
# token: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
> JUST THE WAY I LIKE IT
44
5-
Bacon ipsum dolor amet fatback swine hamburger ham short loin, brisket leberkas alcatra tenderloin filet mignon kevin frankfurter t-bone cupim turducken.
5+
This is my template for new Node.js projects. It is the best one.
66

77
## Install
88

99
```shell
10-
$ npm install PACKAGENAME
10+
npm install PACKAGENAME
1111
```
1212

1313
## Usage
1414

15-
Alcatra pancetta meatball, leberkas ball tip cupim drumstick tongue strip steak.
15+
Use as a GitHub template.
1616

1717
## Tooling
1818

@@ -30,13 +30,17 @@ This template includes:
3030
- **markdownlint** - Markdown linting
3131
- **knip** - Find unused dependencies
3232
- **Renovate** - Automated dependency updates
33+
- **zshy** - Dual-module TS builds
3334

3435
## Development
3536

3637
```bash
3738
# Install dependencies
3839
npm install
3940

41+
# Build
42+
npm run build
43+
4044
# Run tests
4145
npm test
4246

cspell.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
"worktrees"
3030
],
3131
"ignoreRandomStrings": true,
32-
"ignoreWords": ["boneskull"],
33-
"words": ["shankle", "picanha", "bupkis"]
32+
"ignoreWords": [
33+
"boneskull",
34+
"wagoid",
35+
"zshy",
36+
"toshimaru",
37+
"pids",
38+
"jscoverage",
39+
"wscript",
40+
"bahmutov"
41+
],
42+
"words": ["shankle", "picanha", "bupkis", "andouille"]
3443
}

0 commit comments

Comments
 (0)