Skip to content

Commit

Permalink
add test-publish as a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
ricopinazo committed May 16, 2023
1 parent 9f08fe2 commit 3efca44
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ jobs:
TYPE: ${{ inputs.type }}
- name: Build project
run: hatch build
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Create Git Tag
run: |
git tag v$(hatch version)
Expand All @@ -68,9 +64,25 @@ jobs:
name: package
path: dist/*

publish:
test-publish:
needs: [test, release]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: package
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish:
needs: [test, release, test-publish]
runs-on: ubuntu-latest
environment: publishing
permissions:
id-token: write
Expand Down

0 comments on commit 3efca44

Please sign in to comment.