Skip to content

Commit b238cca

Browse files
committed
Add publish self release
1 parent 80026f5 commit b238cca

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Step 2: Publish Self 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: actions/checkout@v4
23+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
24+
- name: Install Dependencies
25+
shell: bash
26+
run: |
27+
pip install -e .
28+
- uses: actions/create-github-app-token@v1
29+
id: app-token
30+
with:
31+
app-id: ${{ vars.APP_ID }}
32+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
33+
- name: Populate Release
34+
id: populate-release
35+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
36+
with:
37+
token: ${{ steps.app-token.outputs.token }}
38+
target: jupyter-server/jupyter_releaser
39+
branch: ${{ github.event.inputs.branch }}
40+
release_url: ${{ github.event.inputs.release_url }}
41+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
42+
43+
- name: Finalize Release
44+
id: finalize-release
45+
env:
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
48+
with:
49+
token: ${{ steps.app-token.outputs.token }}
50+
target: ${{ github.event.inputs.target }}
51+
release_url: ${{ steps.populate-release.outputs.release_url }}
52+
53+
- name: "** Next Step **"
54+
if: ${{ success() }}
55+
run: |
56+
echo "Verify the final release"
57+
echo ${{ steps.finalize-release.outputs.release_url }}
58+
59+
- name: "** Failure Message **"
60+
if: ${{ failure() }}
61+
run: |
62+
echo "Failed to Publish the Draft Release Url:"
63+
echo ${{ steps.populate-release.outputs.release_url }}

0 commit comments

Comments
 (0)