Skip to content

Commit b8d9eec

Browse files
author
Steven Silvester
authored
Merge pull request #153 from jtpio/simplify-publish
Simpler Solution for Full Publish
2 parents 0e4d74b + 90f495f commit b8d9eec

File tree

4 files changed

+91
-109
lines changed

4 files changed

+91
-109
lines changed

.github/workflows/autopublish-release.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/draft-release.yml

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ on:
2020
since_last_stable:
2121
description: Use PRs with activity since the last stable git tag
2222
required: false
23-
auto_publish:
24-
description: Whether to automatically run the Auto Publish workflow
25-
default: true
26-
required: false
2723
jobs:
2824
release:
2925
runs-on: ubuntu-latest
@@ -61,28 +57,7 @@ jobs:
6157
post_version_spec: ${{ github.event.inputs.post_version_spec }}
6258
since: ${{ github.event.inputs.since }}
6359
since_last_stable: ${{ github.event.intputs.since_last_stable }}
64-
65-
- name: "Store Auto Publish URL"
66-
run: |
67-
if [ ${{ github.events.inputs.auto_publish }} == 'true']; then
68-
echo ${{ steps.draft-release.outputs.release_url }} > "draft-release-url.txt"
69-
else:
70-
echo "Skipping auto publish"
71-
echo "" > "draft-release-url.txt"
72-
fi
73-
74-
- name: "Upload Auto Publish URL"
75-
uses: actions/upload-artifact@v2
76-
with:
77-
name: draft-release-url
78-
path: |
79-
draft-release-url.txt
80-
8160
- name: "** Next Step **"
8261
run: |
83-
if [ ${{ github.events.inputs.auto_publish }} == 'true']; then
84-
echo "Wait for the 'Auto Publish workflow to complete';
85-
else
86-
echo "Run the "Publish Release" Workflow with Release Url:"
87-
echo ${{ steps.draft-release.outputs.release_url }}
88-
fi
62+
echo "Run the "Publish Release" Workflow with Release Url:"
63+
echo ${{ steps.draft-release.outputs.release_url }}

.github/workflows/full-release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Full Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
target:
6+
description: "The owner/repo GitHub target"
7+
required: true
8+
branch:
9+
description: "The branch to target"
10+
required: true
11+
version_spec:
12+
description: "New Version Specifier"
13+
required: true
14+
post_version_spec:
15+
description: "Post Version Specifier"
16+
required: false
17+
since:
18+
description: Use PRs with activity since this date or git reference
19+
required: false
20+
since_last_stable:
21+
description: Use PRs with activity since the last stable git tag
22+
required: false
23+
24+
jobs:
25+
release:
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: true
29+
matrix:
30+
python-version: ["3.9"]
31+
env:
32+
VERSION_SPEC: ${{ github.event.inputs.version_spec }}
33+
POST_VERSION_SPEC: ${{ github.event.inputs.post_version_spec }}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- name: Install Python ${{ matrix.python-version }}
38+
uses: actions/setup-python@v2
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
architecture: "x64"
42+
- name: Install node
43+
uses: actions/setup-node@v2
44+
with:
45+
node-version: "14.x"
46+
- name: Upgrade packaging dependencies
47+
run: |
48+
pip install --upgrade pip setuptools wheel --user
49+
50+
- name: Create Draft GitHub Release
51+
id: draft-release
52+
uses: jupyter-server/jupyter_releaser/.github/actions/draft-release@v1
53+
with:
54+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
55+
target: ${{ github.event.inputs.target }}
56+
branch: ${{ github.event.inputs.branch }}
57+
version_spec: ${{ github.event.inputs.version_spec }}
58+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
59+
since: ${{ github.event.inputs.since }}
60+
since_last_stable: ${{ github.event.intputs.since_last_stable }}
61+
62+
- name: Publish Release
63+
id: publish-release
64+
env:
65+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
66+
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
67+
TWINE_USERNAME: __token__
68+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
uses: jupyter-server/jupyter_releaser/.github/actions/publish-release@v1
70+
with:
71+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
72+
release_url: ${{ steps.draft-release.outputs.release_url }}
73+
74+
- name: "** Next Step **"
75+
if: ${{ success() }}
76+
run: |
77+
echo "Verify the final release"
78+
echo ${{ steps.publish-release.outputs.release_url }}
79+
if [ ! -z "${{ steps.publish-release.outputs.pr_url }}" ]; then
80+
echo "Merge the forwardport PR"
81+
echo ${{ steps.publish-release.outputs.pr_url }}
82+
fi
83+
84+
- name: "** Failure Message **"
85+
if: ${{ failure() }}
86+
run: |
87+
echo "Failed to Publish the Draft Release Url:"
88+
echo ${{ steps.draft-release.outputs.release_url }}

jupyter_releaser/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def draft_changelog(
118118
if npm_versions:
119119
body += npm_versions
120120

121-
body += '\n\nAfter merging this PR run the "Draft Release" Workflow on your fork of `jupyter_releaser` with the following inputs'
121+
body += '\n\nAfter merging this PR run the "Full Release" Workflow on your fork of `jupyter_releaser` with the following inputs'
122122
body += f"""
123123
| Input | Value |
124124
| ------------- | ------------- |

0 commit comments

Comments
 (0)