Skip to content

Commit 621364f

Browse files
committed
Use reusable actions and workflows
The guys at Hemi Labs are awesome!
1 parent c7d1226 commit 621364f

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish to NPM
2+
3+
author: Gabriel Montes
4+
5+
description: Sets up Node, runs the prepublishOnly script and publishes the package to the NPM registry
6+
7+
inputs:
8+
token:
9+
description: The NPM access token to use when publishing
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- uses: hemilabs/actions/setup-node-env@main
16+
- run: npm run --if-present prepublishOnly
17+
shell: bash
18+
- uses: JS-DevTools/npm-publish@v3
19+
with:
20+
token: ${{ inputs.token }}
21+
22+
branding:
23+
color: blue
24+
icon: package

.github/workflows/js-checks.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,4 @@ concurrency:
1010

1111
jobs:
1212
run-checks:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-node@v4
17-
with:
18-
node-version-file: .nvmrc
19-
- run: npm ci
20-
- run: npm run format:check
21-
- run: npm run lint
13+
uses: hemilabs/actions/.github/workflows/js-checks.yml@main

.github/workflows/npm-publish.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version-file: .nvmrc
16-
- run: npm ci
17-
- uses: JS-DevTools/npm-publish@v3
13+
- uses: ./.github/actions/publish-to-npm
1814
with:
1915
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)