Skip to content

Commit a0bbee2

Browse files
committed
chore(ci): simplify ci
1 parent 77baba5 commit a0bbee2

File tree

2 files changed

+34
-43
lines changed

2 files changed

+34
-43
lines changed

.github/workflows/nodejs.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Node CI
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
410

511
jobs:
612
build:
7-
813
runs-on: ubuntu-latest
9-
1014
steps:
1115
- uses: actions/checkout@v1
1216
- name: Use Node.js 18
@@ -21,3 +25,30 @@ jobs:
2125
yarn test
2226
env:
2327
CI: true
28+
29+
30+
publish-npm:
31+
needs: build
32+
if: github.ref == 'refs/heads/main'
33+
permissions:
34+
contents: write
35+
issues: write
36+
id-token: write
37+
pull-requests: write
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v1
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: 20
44+
cache: yarn
45+
- run: yarn install --immutable
46+
- run: yarn build
47+
48+
- name: Release
49+
env:
50+
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
51+
NPM_TOKEN: $\{{ secrets.SESAMECARE_OSS_NPM_TOKEN }}
52+
run: |
53+
yarn dlx semantic-release
54+

.github/workflows/npmpublish.yml

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

0 commit comments

Comments
 (0)