Skip to content

Commit 2d0fb91

Browse files
authored
Update Release Scripts (#900)
1 parent 698fa76 commit 2d0fb91

File tree

3 files changed

+54
-11
lines changed

3 files changed

+54
-11
lines changed

.github/workflows/prep-release.yml

+8-1
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
target: ${{ github.event.inputs.target }}
3643
branch: ${{ github.event.inputs.branch }}
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Publish Changelog"
2+
on:
3+
release:
4+
types: [published]
5+
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: "The branch to target"
10+
required: false
11+
12+
jobs:
13+
publish_changelog:
14+
runs-on: ubuntu-latest
15+
environment: release
16+
steps:
17+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
18+
19+
- uses: actions/create-github-app-token@v1
20+
id: app-token
21+
with:
22+
app-id: ${{ vars.APP_ID }}
23+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
24+
25+
- name: Publish changelog
26+
id: publish-changelog
27+
uses: jupyter-server/jupyter_releaser/.github/actions/publish-changelog@v2
28+
with:
29+
token: ${{ steps.app-token.outputs.token }}
30+
branch: ${{ github.event.inputs.branch }}
31+
32+
- name: "** Next Step **"
33+
run: |
34+
echo "Merge the changelog update PR: ${{ steps.publish-changelog.outputs.pr_url }}"

.github/workflows/publish-release.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,32 @@ on:
1515
jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
18+
environment: release
19+
permissions:
20+
id-token: write
1821
steps:
1922
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2023

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+
2130
- name: Populate Release
2231
id: populate-release
2332
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
2433
with:
25-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
26-
target: ${{ github.event.inputs.target }}
34+
token: ${{ steps.app-token.outputs.token }}
2735
branch: ${{ github.event.inputs.branch }}
2836
release_url: ${{ github.event.inputs.release_url }}
2937
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
3038

3139
- name: Finalize Release
3240
id: finalize-release
33-
env:
34-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
35-
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
36-
TWINE_USERNAME: __token__
37-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
41+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
3942
with:
40-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
41-
target: ${{ github.event.inputs.target }}
43+
token: ${{ steps.app-token.outputs.token }}
4244
release_url: ${{ steps.populate-release.outputs.release_url }}
4345

4446
- name: "** Next Step **"

0 commit comments

Comments
 (0)