Skip to content

Commit 6ec4fb8

Browse files
committed
prep for releaser v2
1 parent b103850 commit 6ec4fb8

File tree

6 files changed

+119
-19
lines changed

6 files changed

+119
-19
lines changed

.github/workflows/check-release.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,12 @@ jobs:
1414
check_release:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v2
19-
20-
- name: Base Setup
21-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
22-
23-
- name: Upgrade packaging dependencies
24-
run: |
25-
pip install --upgrade jupyter-packaging~=0.10 --user
26-
27-
- name: Install Dependencies
28-
run: |
29-
pip install .
30-
17+
- uses: actions/checkout@v2
18+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
3119
- name: Check Release
32-
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
20+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
3321
with:
3422
token: ${{ secrets.GITHUB_TOKEN }}
35-
3623
- name: Upload Distributions
3724
uses: actions/upload-artifact@v2
3825
with:

.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:
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/prep-release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
target: ${{ github.event.inputs.target }}
36+
branch: ${{ github.event.inputs.branch }}
37+
since: ${{ github.event.inputs.since }}
38+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
39+
40+
- name: "** Next Step **"
41+
run: |
42+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

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

.github/workflows/tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ jobs:
3333
- name: Test with pytest
3434
run: |
3535
python -m pytest -vvv jupyter_resource_usage --cov=jupyter_resource_usage --junitxml=python_junit.xml --cov-report=xml --cov-branch
36+
37+
check_links:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
42+
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ default = ""
4343
name = "release"
4444
default = ""
4545

46-
[tool.jupyter-releaser]
47-
skip = ["check-links"]
48-
4946
[tool.jupyter-releaser.hooks]
5047
before-build-npm = ["python -m pip install jupyterlab~=3.0", "jlpm clean", "jlpm build:prod"]
5148

0 commit comments

Comments
 (0)