Skip to content

Commit 8dd5106

Browse files
authored
ci: add npm publish workflow (#1851)
1 parent 55a44bc commit 8dd5106

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish to NPM & Github
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
- rel/**
9+
10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: write
13+
14+
jobs:
15+
publish:
16+
if: |
17+
github.event.pull_request.merged == true &&
18+
contains(github.event.pull_request.title, 'chore: Release')
19+
uses: OneSignal/sdk-actions/.github/workflows/publish-npm-github.yml@main
20+
with:
21+
branch: ${{ github.event.pull_request.base.ref }}

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ jobs:
129129
git config user.name "github-actions[bot]"
130130
git config user.email "github-actions[bot]@users.noreply.github.com"
131131
132-
# Update package.json version & lockfile
132+
# Update package.json version
133133
bun pm pkg set version="$NEW_VERSION"
134-
bun install
135134
136135
git add .
137136
git commit -m "Release $NEW_VERSION"

0 commit comments

Comments
 (0)