Skip to content

Commit f8941ee

Browse files
committed
ci: add publisher workflows
1 parent 4d3c73d commit f8941ee

File tree

3 files changed

+158
-0
lines changed

3 files changed

+158
-0
lines changed

.github/workflows/full-release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: "Steps 1 + 2: Full Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: "New Version Specifier"
7+
default: "next"
8+
required: false
9+
branch:
10+
description: "The branch to target"
11+
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
15+
since:
16+
description: "Use PRs with activity since this date or git reference"
17+
required: false
18+
since_last_stable:
19+
description: "Use PRs with activity since the last stable git tag"
20+
required: false
21+
type: boolean
22+
steps_to_skip:
23+
description: "Comma separated list of steps to skip during Populate Release"
24+
required: false
25+
jobs:
26+
full_release:
27+
runs-on: ubuntu-latest
28+
permissions:
29+
# This is useful if you want to use PyPI trusted publisher
30+
# and NPM provenance
31+
id-token: write
32+
steps:
33+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
34+
35+
- name: Prep Release
36+
id: prep-release
37+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
38+
with:
39+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
40+
version_spec: ${{ github.event.inputs.version_spec }}
41+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
42+
branch: ${{ github.event.inputs.branch }}
43+
since: ${{ github.event.inputs.since }}
44+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
45+
46+
- name: Populate Release
47+
id: populate-release
48+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
49+
with:
50+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
51+
branch: ${{ github.event.inputs.branch }}
52+
release_url: ${{ steps.prep-release.outputs.release_url }}
53+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
54+
55+
- name: Finalize Release
56+
id: finalize-release
57+
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
58+
with:
59+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
60+
release_url: ${{ steps.populate-release.outputs.release_url }}
61+
62+
- name: "** Next Step **"
63+
if: ${{ success() }}
64+
run: |
65+
echo "Verify the final release"
66+
echo ${{ steps.finalize-release.outputs.release_url }}

.github/workflows/prep-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Step 1: Prep Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: "New Version Specifier"
7+
default: "next"
8+
required: false
9+
branch:
10+
description: "The branch to target"
11+
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
15+
since:
16+
description: "Use PRs with activity since this date or git reference"
17+
required: false
18+
since_last_stable:
19+
description: "Use PRs with activity since the last stable git tag"
20+
required: false
21+
type: boolean
22+
jobs:
23+
prep_release:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27+
28+
- name: Prep Release
29+
id: prep-release
30+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
31+
with:
32+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
33+
version_spec: ${{ github.event.inputs.version_spec }}
34+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
35+
branch: ${{ github.event.inputs.branch }}
36+
since: ${{ github.event.inputs.since }}
37+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
38+
39+
- name: "** Next Step **"
40+
run: |
41+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Step 2: Publish Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: "The target branch"
7+
required: false
8+
release_url:
9+
description: "The URL of the draft GitHub release"
10+
required: false
11+
steps_to_skip:
12+
description: "Comma separated list of steps to skip"
13+
required: false
14+
15+
jobs:
16+
publish_release:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# This is useful if you want to use PyPI trusted publisher
20+
# and NPM provenance
21+
id-token: write
22+
steps:
23+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
24+
25+
- name: Populate Release
26+
id: populate-release
27+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
28+
with:
29+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
30+
branch: ${{ github.event.inputs.branch }}
31+
release_url: ${{ github.event.inputs.release_url }}
32+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
33+
34+
- name: Finalize Release
35+
id: finalize-release
36+
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
37+
with:
38+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
39+
release_url: ${{ steps.populate-release.outputs.release_url }}
40+
41+
- name: "** Next Step **"
42+
if: ${{ success() }}
43+
run: |
44+
echo "Verify the final release"
45+
echo ${{ steps.finalize-release.outputs.release_url }}
46+
47+
- name: "** Failure Message **"
48+
if: ${{ failure() }}
49+
run: |
50+
echo "Failed to Publish the Draft Release Url:"
51+
echo ${{ steps.populate-release.outputs.release_url }}

0 commit comments

Comments
 (0)