Skip to content

Commit 1c00a80

Browse files
committed
Setup releaser bot
1 parent 3baddd0 commit 1c00a80

File tree

4 files changed

+131
-0
lines changed

4 files changed

+131
-0
lines changed

.github/workflows/check-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches: ['master']
5+
pull_request:
6+
branches: ['*']
7+
8+
jobs:
9+
check_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Base Setup
16+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
17+
18+
- name: Check Release
19+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Upload Distributions
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: jupytercad-releaser-dist-${{ github.run_number }}
27+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-labels.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
steps:
10+
- name: enforce-triage-label
11+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.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+
required: false
8+
branch:
9+
description: 'The branch to target'
10+
required: false
11+
post_version_spec:
12+
description: 'Post Version Specifier'
13+
required: false
14+
since:
15+
description: 'Use PRs with activity since this date or git reference'
16+
required: false
17+
since_last_stable:
18+
description: 'Use PRs with activity since the last stable git tag'
19+
required: false
20+
type: boolean
21+
jobs:
22+
prep_release:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
26+
27+
- name: Prep Release
28+
id: prep-release
29+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
30+
with:
31+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
32+
version_spec: ${{ github.event.inputs.version_spec }}
33+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
34+
target: ${{ github.event.inputs.target }}
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: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
branch: ${{ github.event.inputs.branch }}
27+
release_url: ${{ github.event.inputs.release_url }}
28+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
29+
30+
- name: Finalize Release
31+
id: finalize-release
32+
env:
33+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
34+
TWINE_USERNAME: __token__
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
37+
with:
38+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
39+
target: ${{ github.event.inputs.target }}
40+
release_url: ${{ steps.populate-release.outputs.release_url }}
41+
42+
- name: '** Next Step **'
43+
if: ${{ success() }}
44+
run: |
45+
echo "Verify the final release"
46+
echo ${{ steps.finalize-release.outputs.release_url }}
47+
48+
- name: '** Failure Message **'
49+
if: ${{ failure() }}
50+
run: |
51+
echo "Failed to Publish the Draft Release Url:"
52+
echo ${{ steps.populate-release.outputs.release_url }}

0 commit comments

Comments
 (0)