Skip to content

Commit a0e4d0e

Browse files
authored
Update the releaser workflows (#1370)
1 parent 0ed27e7 commit a0e4d0e

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/prep-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
post_version_spec:
1313
description: "Post Version Specifier"
1414
required: false
15+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
1519
since:
1620
description: "Use PRs with activity since this date or git reference"
1721
required: false
@@ -22,15 +26,18 @@ on:
2226
jobs:
2327
prep_release:
2428
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
2531
steps:
2632
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2733

2834
- name: Prep Release
2935
id: prep-release
3036
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
3137
with:
32-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
3339
version_spec: ${{ github.event.inputs.version_spec }}
40+
# silent: ${{ github.event.inputs.silent }}
3441
post_version_spec: ${{ github.event.inputs.post_version_spec }}
3542
branch: ${{ github.event.inputs.branch }}
3643
since: ${{ github.event.inputs.since }}

.github/workflows/publish-release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,23 @@ on:
1515
jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
18+
environment: release
1819
permissions:
19-
# This is useful if you want to use PyPI trusted publisher
20-
# and NPM provenance
2120
id-token: write
2221
steps:
2322
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2423

24+
- uses: actions/create-github-app-token@v1
25+
id: app-token
26+
with:
27+
app-id: ${{ vars.APP_ID }}
28+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
29+
2530
- name: Populate Release
2631
id: populate-release
2732
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
2833
with:
29-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
34+
token: ${{ steps.app-token.outputs.token }}
3035
branch: ${{ github.event.inputs.branch }}
3136
release_url: ${{ github.event.inputs.release_url }}
3237
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
@@ -37,7 +42,7 @@ jobs:
3742
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3843
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
3944
with:
40-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
45+
token: ${{ steps.app-token.outputs.token }}
4146
release_url: ${{ steps.populate-release.outputs.release_url }}
4247

4348
- name: "** Next Step **"

0 commit comments

Comments
 (0)