Skip to content

Commit c64ec3b

Browse files
authored
Fix CI, release and NPM publish (#88)
* fix GH actions: CI shouldn't publish, release should * fix GH actions: CI shouldn't publish, release should
1 parent b03da8a commit c64ec3b

3 files changed

Lines changed: 24 additions & 41 deletions

File tree

.github/workflows/ci-github.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Node.js Package
2+
on:
3+
pull_request:
4+
branches: [main]
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
# Setup .npmrc file to publish to GitHub Packages
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "20.x"
17+
# Defaults to the user or organization that owns the workflow file
18+
# scope: '@octocat'
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm run coverage
22+
- run: npm run lint

.github/workflows/pr-ci-github.yml

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

.github/workflows/publish-github.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
name: Node.js Package
22
on:
3-
pull_request:
4-
branches: [main]
5-
push:
6-
branches: [main]
3+
release:
4+
types: [published]
75

86
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
# Setup .npmrc file to publish to GitHub Packages
14-
- uses: actions/setup-node@v1
15-
with:
16-
node-version: "20.x"
17-
# Defaults to the user or organization that owns the workflow file
18-
# scope: '@octocat'
19-
- run: npm ci
20-
- run: npm run build
21-
- run: npm run coverage
22-
- run: npm run lint
23-
247
publish-npm:
25-
needs: build
26-
if: github.ref == 'refs/heads/main'
278
runs-on: ubuntu-latest
289
steps:
2910
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)