Skip to content

Commit 8419cc7

Browse files
authored
Update releaser workflows (#1453)
* Update releaser workflows * uncomment silent
1 parent 421772c commit 8419cc7

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/prep-release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
1-
name: 'Step 1: Prep Release'
1+
name: "Step 1: Prep Release"
22
on:
33
workflow_dispatch:
44
inputs:
55
version_spec:
6-
description: 'New Version Specifier'
7-
default: 'next'
6+
description: "New Version Specifier"
7+
default: "next"
88
required: false
99
branch:
10-
description: 'The branch to target'
10+
description: "The branch to target"
1111
required: false
1212
post_version_spec:
13-
description: 'Post Version Specifier'
13+
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:
16-
description: 'Use PRs with activity since this date or git reference'
20+
description: "Use PRs with activity since this date or git reference"
1721
required: false
1822
since_last_stable:
19-
description: 'Use PRs with activity since the last stable git tag'
23+
description: "Use PRs with activity since the last stable git tag"
2024
required: false
2125
type: boolean
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 }}
35-
target: ${{ github.event.inputs.target }}
3642
branch: ${{ github.event.inputs.branch }}
3743
since: ${{ github.event.inputs.since }}
3844
since_last_stable: ${{ github.event.inputs.since_last_stable }}
3945

40-
- name: '** Next Step **'
46+
- name: "** Next Step **"
4147
run: |
4248
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
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

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,16 +42,16 @@ 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

43-
- name: '** Next Step **'
48+
- name: "** Next Step **"
4449
if: ${{ success() }}
4550
run: |
4651
echo "Verify the final release"
4752
echo ${{ steps.finalize-release.outputs.release_url }}
4853
49-
- name: '** Failure Message **'
54+
- name: "** Failure Message **"
5055
if: ${{ failure() }}
5156
run: |
5257
echo "Failed to Publish the Draft Release Url:"

0 commit comments

Comments
 (0)