Skip to content

Commit 232c63d

Browse files
jtpioZsailer
authored andcommitted
Add GitHub Actions workflow for publishing release
1 parent 0df42ad commit 232c63d

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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@v2
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+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
42+
with:
43+
token: ${{ steps.app-token.outputs.token }}
44+
release_url: ${{ steps.populate-release.outputs.release_url }}
45+
46+
- name: "** Next Step **"
47+
if: ${{ success() }}
48+
run: |
49+
echo "Verify the final release"
50+
echo ${{ steps.finalize-release.outputs.release_url }}
51+
52+
- name: "** Failure Message **"
53+
if: ${{ failure() }}
54+
run: |
55+
echo "Failed to Publish the Draft Release Url:"
56+
echo ${{ steps.populate-release.outputs.release_url }}

0 commit comments

Comments
 (0)