Skip to content

Commit f49e8e6

Browse files
CI: NPM publish from GHA (#40)
* NPM publish from GHA Align build.yml with similar projects * Tweaks based on review
1 parent 4192638 commit f49e8e6

File tree

2 files changed

+16
-85
lines changed

2 files changed

+16
-85
lines changed

.circleci/config.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
name: Test & Build
2-
1+
name: build
32
on:
3+
release:
4+
types: [created]
45
push:
5-
branches: '*'
6-
pull_request:
7-
branches: '*'
8-
6+
branches:
7+
- '**'
98
jobs:
10-
test-build:
11-
name: Run tests and build project
9+
build:
1210
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 18
17+
node-version: '20.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
cache: npm
1820
- run: npm ci
21+
- run: npm run test:coverage
1922
- run: npm run build
23+
- run: npm publish
24+
if: github.event_name == 'release' && github.event.action == 'created'
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)