Skip to content

Commit

Permalink
Rewrite GH action to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Aug 19, 2024
1 parent ebdeed0 commit d78e260
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
Expand All @@ -16,19 +13,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5.1.1
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
run: rye sync

- name: Build package
run: python -m build
run: rye build

- name: Publish package
uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
uses: rye publish --token "${{ secrets.PYPI_API_TOKEN }}" --yes

0 comments on commit d78e260

Please sign in to comment.