diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..f3233e29 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,21 @@ +name: Publish to NPM & Github +on: + pull_request: + types: + - closed + branches: + - main + - rel/** + +permissions: + id-token: write # Required for OIDC + contents: write + +jobs: + publish: + if: | + github.event.pull_request.merged == true && + contains(github.event.pull_request.title, 'chore: Release') + uses: OneSignal/sdk-actions/.github/workflows/publish-npm-github.yml@main + with: + branch: ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 2817c8eb..3e5645f1 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -129,9 +129,8 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - # Update package.json version & lockfile + # Update package.json version bun pm pkg set version="$NEW_VERSION" - bun install git add . git commit -m "Release $NEW_VERSION"