Skip to content

Commit ea20c28

Browse files
authored
Update release workflows (#114)
Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 7932d2a commit ea20c28

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
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: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
1-
name: 'Step 2: Publish Release'
1+
name: "Step 2: Publish Release"
22
on:
33
workflow_dispatch:
44
inputs:
55
branch:
6-
description: 'The target branch'
6+
description: "The target branch"
77
required: false
88
release_url:
9-
description: 'The URL of the draft GitHub release'
9+
description: "The URL of the draft GitHub release"
1010
required: false
1111
steps_to_skip:
12-
description: 'Comma separated list of steps to skip'
12+
description: "Comma separated list of steps to skip"
1313
required: false
1414
default: 'build-python'
1515

1616
jobs:
1717
publish_release:
1818
runs-on: ubuntu-latest
19+
environment: release
1920
permissions:
2021
id-token: write
2122
steps:
2223
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2324

25+
- uses: actions/create-github-app-token@v1
26+
id: app-token
27+
with:
28+
app-id: ${{ vars.APP_ID }}
29+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
30+
2431
- name: Populate Release
2532
id: populate-release
2633
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
2734
with:
28-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
35+
token: ${{ steps.app-token.outputs.token }}
2936
branch: ${{ github.event.inputs.branch }}
3037
release_url: ${{ github.event.inputs.release_url }}
3138
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
@@ -34,18 +41,18 @@ jobs:
3441
id: finalize-release
3542
env:
3643
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37-
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
44+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
3845
with:
39-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
46+
token: ${{ steps.app-token.outputs.token }}
4047
release_url: ${{ steps.populate-release.outputs.release_url }}
4148

42-
- name: '** Next Step **'
49+
- name: "** Next Step **"
4350
if: ${{ success() }}
4451
run: |
4552
echo "Verify the final release"
4653
echo ${{ steps.finalize-release.outputs.release_url }}
4754
48-
- name: '** Failure Message **'
55+
- name: "** Failure Message **"
4956
if: ${{ failure() }}
5057
run: |
5158
echo "Failed to Publish the Draft Release Url:"

0 commit comments

Comments
 (0)