Skip to content

Commit c5b3ee1

Browse files
committed
workflow(release): add rtk token fallback
1 parent 411fea9 commit c5b3ee1

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- linux
1515
- mac
1616

17+
env:
18+
RTK_INSTALL_GITHUB_TOKEN: ${{ secrets.RTK_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
19+
RTK_INSTALL_GITHUB_TOKEN_SOURCE: ${{ secrets.RTK_GITHUB_TOKEN != '' && 'RTK_GITHUB_TOKEN' || 'GITHUB_TOKEN' }}
20+
1721
jobs:
1822
build-windows:
1923
if: github.event.inputs.platform == 'all' || contains(github.event.inputs.platform, 'windows')
@@ -53,8 +57,15 @@ jobs:
5357
npm_config_platform: win32
5458
npm_config_arch: ${{ matrix.arch }}
5559

60+
- name: Report RTK install token source
61+
shell: bash
62+
run: |
63+
echo "RTK runtime install token source: ${RTK_INSTALL_GITHUB_TOKEN_SOURCE}"
64+
5665
- name: Install Node Runtime
5766
run: pnpm run installRuntime:win:${{ matrix.arch }}
67+
env:
68+
GITHUB_TOKEN: ${{ env.RTK_INSTALL_GITHUB_TOKEN }}
5869

5970
- name: Build Windows
6071
run: |
@@ -166,8 +177,15 @@ jobs:
166177
- name: Install dependencies
167178
run: pnpm install
168179

180+
- name: Report RTK install token source
181+
shell: bash
182+
run: |
183+
echo "RTK runtime install token source: ${RTK_INSTALL_GITHUB_TOKEN_SOURCE}"
184+
169185
- name: Install Node Runtime
170186
run: pnpm run installRuntime:mac:${{ matrix.arch }}
187+
env:
188+
GITHUB_TOKEN: ${{ env.RTK_INSTALL_GITHUB_TOKEN }}
171189

172190
- name: Build Mac
173191
run: |

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
permissions:
1515
contents: write
1616

17+
env:
18+
RTK_INSTALL_GITHUB_TOKEN: ${{ secrets.RTK_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
19+
RTK_INSTALL_GITHUB_TOKEN_SOURCE: ${{ secrets.RTK_GITHUB_TOKEN != '' && 'RTK_GITHUB_TOKEN' || 'GITHUB_TOKEN' }}
20+
1721
jobs:
1822
resolve-tag:
1923
runs-on: ubuntu-latest
@@ -148,8 +152,15 @@ jobs:
148152
npm_config_platform: win32
149153
npm_config_arch: ${{ matrix.arch }}
150154

155+
- name: Report RTK install token source
156+
shell: bash
157+
run: |
158+
echo "RTK runtime install token source: ${RTK_INSTALL_GITHUB_TOKEN_SOURCE}"
159+
151160
- name: Install Node Runtime
152161
run: pnpm run installRuntime:win:${{ matrix.arch }}
162+
env:
163+
GITHUB_TOKEN: ${{ env.RTK_INSTALL_GITHUB_TOKEN }}
153164

154165
- name: Build Windows
155166
run: |
@@ -266,8 +277,15 @@ jobs:
266277
- name: Install dependencies
267278
run: pnpm install
268279

280+
- name: Report RTK install token source
281+
shell: bash
282+
run: |
283+
echo "RTK runtime install token source: ${RTK_INSTALL_GITHUB_TOKEN_SOURCE}"
284+
269285
- name: Install Node Runtime
270286
run: pnpm run installRuntime:mac:${{ matrix.arch }}
287+
env:
288+
GITHUB_TOKEN: ${{ env.RTK_INSTALL_GITHUB_TOKEN }}
271289

272290
- name: Build Mac
273291
run: |

0 commit comments

Comments
 (0)