Skip to content

Commit

Permalink
Update and improve publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rathaumons authored Aug 26, 2024
1 parent 347e76f commit d83c451
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,44 @@ jobs:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install "setuptools>=67.2.0"
pip install -r requirements.txt
pip install wheel build PyYAML
- name: Build .whl
- name: Build
run: |
python -m build --wheel --skip-dependency-check
- name: Archive wheels
uses: actions/upload-artifact@v3
- name: Archive
uses: actions/upload-artifact@v4
with:
name: pypi-dist-wheel
path: dist/*.whl

build_source:
name: Build source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install "setuptools>=67.2.0"
pip install wheel build PyYAML
- name: Build .tar.gz
- name: Build
run: |
python -m build --sdist --skip-dependency-check
- name: Archive wheels
uses: actions/upload-artifact@v3
- name: Archive
uses: actions/upload-artifact@v4
with:
name: pypi-dist-source
path: dist/*.tar.gz

publish_pypi:
Expand All @@ -58,10 +59,11 @@ jobs:
permissions:
id-token: write
steps:
- name: Collect and extract artifact
uses: actions/download-artifact@v3
- name: Collect artifacts
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
pattern: pypi-dist-*
merge-multiple: true
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit d83c451

Please sign in to comment.