Skip to content

Commit

Permalink
Test-PyPI upload on pre-release
Browse files Browse the repository at this point in the history
This commit adds a new check to pre-release workflow to test the pypi
upload by uploading the avocado build into test-pypi server.

Reference: #5903
Signed-off-by: Jan Richter <[email protected]>
  • Loading branch information
richtja committed May 3, 2024
1 parent 7e7bd75 commit 61e7a5f
Showing 1 changed file with 36 additions and 0 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/

0 comments on commit 61e7a5f

Please sign in to comment.