Skip to content

Commit 7c7b01b

Browse files
Use jupyter-releaser (#16)
1 parent 5010afd commit 7c7b01b

File tree

7 files changed

+287
-0
lines changed

7 files changed

+287
-0
lines changed

.github/workflows/check-release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
13+
check_release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Base Setup
19+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
20+
- name: Install Dependencies
21+
shell: bash
22+
run: |
23+
pip install -e .
24+
- name: Check Release
25+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Upload Distributions
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: dist-${{ github.run_number }}
32+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.github/workflows/full-release.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
19+
since:
20+
description: "Use PRs with activity since this date or git reference"
21+
required: false
22+
since_last_stable:
23+
description: "Use PRs with activity since the last stable git tag"
24+
required: false
25+
type: boolean
26+
steps_to_skip:
27+
description: "Comma separated list of steps to skip during Populate Release"
28+
required: false
29+
jobs:
30+
prep_release:
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: write
34+
steps:
35+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
36+
37+
- name: Prep Release
38+
id: prep-release
39+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
version_spec: ${{ github.event.inputs.version_spec }}
43+
# silent: ${{ github.event.inputs.silent }}
44+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
45+
target: ${{ github.event.inputs.target }}
46+
branch: ${{ github.event.inputs.branch }}
47+
since: ${{ github.event.inputs.since }}
48+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
49+
50+
publish_release:
51+
needs: [prep_release]
52+
runs-on: ubuntu-latest
53+
environment: release
54+
permissions:
55+
id-token: write
56+
steps:
57+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
58+
59+
- uses: actions/create-github-app-token@v1
60+
id: app-token
61+
with:
62+
app-id: ${{ vars.APP_ID }}
63+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
64+
65+
- name: Populate Release
66+
id: populate-release
67+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
68+
with:
69+
token: ${{ steps.app-token.outputs.token }}
70+
target: ${{ github.event.inputs.target }}
71+
branch: ${{ github.event.inputs.branch }}
72+
release_url: ${{ github.event.inputs.release_url }}
73+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
74+
75+
- name: Finalize Release
76+
id: finalize-release
77+
env:
78+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
80+
with:
81+
token: ${{ steps.app-token.outputs.token }}
82+
target: ${{ github.event.inputs.target }}
83+
release_url: ${{ steps.populate-release.outputs.release_url }}
84+
85+
- name: "** Next Step **"
86+
if: ${{ success() }}
87+
run: |
88+
echo "Verify the final release"
89+
echo ${{ steps.finalize-release.outputs.release_url }}
90+
91+
- name: "** Failure Message **"
92+
if: ${{ failure() }}
93+
run: |
94+
echo "Failed to Publish the Draft Release Url:"
95+
echo ${{ steps.populate-release.outputs.release_url }}

.github/workflows/prep-release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# silent:
16+
# description: "Set a placeholder in the changelog and don't publish the release."
17+
# required: false
18+
# type: boolean
19+
since:
20+
description: "Use PRs with activity since this date or git reference"
21+
required: false
22+
since_last_stable:
23+
description: "Use PRs with activity since the last stable git tag"
24+
required: false
25+
type: boolean
26+
jobs:
27+
prep_release:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
steps:
32+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
33+
34+
- name: Prep Release
35+
id: prep-release
36+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
version_spec: ${{ github.event.inputs.version_spec }}
40+
# silent: ${{ github.event.inputs.silent }}
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: "** Next Step **"
47+
run: |
48+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
Lines changed: 34 additions & 0 deletions
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

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
environment: release
19+
permissions:
20+
id-token: write
21+
steps:
22+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
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+
30+
- name: Populate Release
31+
id: populate-release
32+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
33+
with:
34+
token: ${{ steps.app-token.outputs.token }}
35+
branch: ${{ github.event.inputs.branch }}
36+
release_url: ${{ github.event.inputs.release_url }}
37+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
38+
39+
- name: Finalize Release
40+
id: finalize-release
41+
env:
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
44+
with:
45+
token: ${{ steps.app-token.outputs.token }}
46+
release_url: ${{ steps.populate-release.outputs.release_url }}
47+
48+
- name: "** Next Step **"
49+
if: ${{ success() }}
50+
run: |
51+
echo "Verify the final release"
52+
echo ${{ steps.finalize-release.outputs.release_url }}
53+
54+
- name: "** Failure Message **"
55+
if: ${{ failure() }}
56+
run: |
57+
echo "Failed to Publish the Draft Release Url:"
58+
echo ${{ steps.populate-release.outputs.release_url }}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
<!-- <START NEW CHANGELOG ENTRY> -->
4+
5+
## 0.3.7
6+
7+
<!-- <END NEW CHANGELOG ENTRY> -->

0 commit comments

Comments
 (0)