-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Simplify Publish workflow #5802
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5802 +/- ##
==========================================
+ Coverage 88.93% 88.94% +0.01%
==========================================
Files 162 162
Lines 10988 11002 +14
Branches 1797 1798 +1
==========================================
+ Hits 9772 9786 +14
Misses 937 937
Partials 279 279
|
💡 We could even simplify this workflow: name: Publish
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' # Release Candidate
- '[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # Development
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: |
pip install --upgrade build twine
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }} With this we can remove the Check Tag step and this action will be only executed when we push a new tag that matches our pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The proposed simplification also sounds good to me. In fact, we haven’t released an rc or dev version in years, and I don’t expect us to do so any time soon, so we could even remove those 2 patterns as well. |
@Gallaecio I pushed the refactor, i also use the same workflow on my personal project: https://github.com/Laerte/aes_pkcs5/blob/main/.github/workflows/publish.yml and works flawless! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Thanks @Laerte! |
Simplify publish workflow by using official PyPI publish action.