Skip to content
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

Update pypi-publish.yml #99

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ jobs:
name: Publish tagged release on PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install utilities
run: sudo apt-get install -y mmv
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
Expand All @@ -30,18 +28,12 @@ jobs:
--wheel
--outdir dist/
.
- name: Create timestamp
run: echo timestamp=$(date +%s) >> $GITHUB_ENV
- name: Rename built files to include timestamp
run: |
mmv -v dist/'*.*.*-*' dist/'#1.#2.#3-'$timestamp'-#4'
mmv -v dist/'*.tar.gz' dist/'#1-'$timestamp.tar.gz
- name: Publish distribution package to PyPI (test)
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution package to PyPI (production)
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}