Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/npm_publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Publish SDK

on:
push:
pull_request:
types: [ closed ]
branches: [ "main" ]

permissions:
Expand All @@ -10,11 +11,13 @@ permissions:

jobs:
publish-npm:
if: contains(github.event.head_commit.message, 'Release')
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Release')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}

- uses: actions/setup-node@v4
with:
Expand All @@ -26,13 +29,16 @@ jobs:
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Publish to npm
run: npm publish --access public

Expand Down
Loading