Skip to content

Commit

Permalink
Merge remote-tracking branch 'richtja/pypi_upload_update'
Browse files Browse the repository at this point in the history
Signed-off-by: Cleber Rosa <[email protected]>
  • Loading branch information
clebergnu committed May 6, 2024
2 parents d72a7ae + 61e7a5f commit 1c3cfa3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,39 @@ jobs:
name: job-results-deployment
path: /github/home/avocado/job-results/
retention-days: 1

package-build:
name: Build Package (wheel/tarball)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build tarballs and wheels
run: make -f Makefile.gh build-wheel check-wheel
- name: Save tarballs and wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: tarballs_and_wheels
path: ${{github.workspace}}/PYPI_UPLOAD/
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."

publish-to-test-pypi:
name: Publish Avocado to TestPyPI
needs:
- package-build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/avocado-framework
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the wheels
uses: actions/download-artifact@v4
with:
name: tarballs_and_wheels
path: dist/
- name: Publish avocado to test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,25 @@ jobs:
run: |
make -f Makefile.gh build-update-readthedocs
- run: echo "In a few minutes the release documentation will be available in https://${{ github.event.inputs.rtd_project }}.readthedocs.io/en/${{ github.event.inputs.version }}/"
- name: Upload to pypi
continue-on-error: true
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWD }}
run: make -f Makefile.gh update-pypi

publish-to-pypi:
name: Publish Avocado to PyPI
needs:
- release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/avocado-framework
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the wheels
uses: actions/download-artifact@v4
with:
name: wheel
path: dist/
- name: Publish avocado to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

build-and-publish-eggs:
name: Build eggs and publish them
Expand Down

0 comments on commit 1c3cfa3

Please sign in to comment.