File tree Expand file tree Collapse file tree 3 files changed +28
-36
lines changed
Expand file tree Collapse file tree 3 files changed +28
-36
lines changed Original file line number Diff line number Diff line change 1+ # Filename (cd.yml) should match the workflow filename in Trusted Publisher setting on npmjs
2+ name : Publish to NPM & Github
3+ on :
4+ pull_request :
5+ types :
6+ - closed
7+ branches :
8+ - main
9+ - rel/**
10+
11+ permissions :
12+ id-token : write # Required for OIDC
13+ contents : write
14+
15+ jobs :
16+ publish :
17+ if : |
18+ github.event.pull_request.merged == true &&
19+ contains(github.event.pull_request.title, 'chore: Release')
20+ uses : OneSignal/sdk-actions/.github/workflows/publish-npm-github.yml@main
21+ with :
22+ branch : ${{ github.event.pull_request.base.ref }}
23+ packages : ' ["com.onesignal.unity.core", "com.onesignal.unity.android", "com.onesignal.unity.ios"]'
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ jobs:
131131 create-pr :
132132 needs : [prep, update-version]
133133 uses : OneSignal/sdk-actions/.github/workflows/create-release.yml@main
134+ secrets :
135+ # Need this cross-repo token (sdk-actions & this repo) to perform changes
136+ GH_PUSH_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
134137 with :
135138 # Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
136139 target_repo : OneSignal/OneSignal-Unity-SDK
@@ -148,7 +151,9 @@ jobs:
148151 - name : Checkout
149152 uses : actions/checkout@v5
150153 with :
154+ repository : OneSignal/OneSignal-Unity-SDK
151155 ref : ${{ needs.prep.outputs.release_branch }}
156+ token : ${{ secrets.GH_PUSH_TOKEN || github.token }}
152157
153158 - name : Get PR release notes
154159 id : notes
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments