-
-
Notifications
You must be signed in to change notification settings - Fork 189
.github: Add Automated release process #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# For more information, see the "Release a new version" notes in pyproject.toml. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
corona10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade build | ||
- name: Build | ||
run: | | ||
python -m build | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,14 @@ | |
# - check the CI status: | ||
# https://github.com/python/pyperformance/actions | ||
# | ||
# Release a new version: | ||
# Release a new version with GitHub (preferred): | ||
# | ||
# - go to the GitHub release tab: https://github.com/python/pyperformance/releases | ||
# - click "Draft a new release" and fill the contents | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean "Create a new release"? The URL is https://github.com/python/pyperformance/releases/new, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding "fill the contents", presumably you mean the following:
Is the above correct? Regarding (1), what's the best way to determine what the next version should be? It might be obvious to many, but it would help some if this were spelled out. Also, the tag should not exist yet right? Regarding (4), what should go here? It seems like, at most, it would include either a basic "what's new" list or a link to a changelog. Leaving it blank would probably be fine too. Is there a way to have a template for this field (and maybe for (3) the "Release title" field? Anyway, what you have is probably fine, but it may be worth putting a bit more info here in this comment in pyproject.toml. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, am I correct in thinking that the "Prepare a release" steps remain unchanged? If we can have a "publish" template, it would be nice if also reminded the person to make sure they completed those steps already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For (1), you can either pick an existing tag, or create a new one - the drop down box has "Find or create a new tag". Because we've not created one yet with these steps, we want to create a new one? For (2) and (3), sounds good. For (4), one option is to click the "Generate release notes" button and it'll fill something in based on the PRs that were merged. |
||
# - finally click the "Publish release" button! Done! | ||
corona10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# - monitor the publish status: https://github.com/python/pyperformance/actions/workflows/publish.yml | ||
ericsnowcurrently marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# | ||
# Release a new version manually: | ||
# | ||
# - git tag VERSION | ||
# - git push --tags | ||
|
Uh oh!
There was an error while loading. Please reload this page.