Skip to content

Commit

Permalink
ci: pypi and testpypi functionalities (opentargets#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
d0choa authored Jan 17, 2024
1 parent ddcc288 commit a30d53a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

"on":
push:
branches: ["main", "master", "release/**"]
branches: ["main", "release/**"]

concurrency:
group: deploy
Expand Down Expand Up @@ -42,6 +42,16 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.semrelease.outputs.tag }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.semrelease.outputs.released }} == 'true' && github.ref == 'refs/heads/main'

- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.semrelease.outputs.released }} == 'true' && github.ref != 'refs/heads/main'
with:
repository-url: https://test.pypi.org/legacy/

documentation:
needs: release
runs-on: ubuntu-latest
Expand Down

0 comments on commit a30d53a

Please sign in to comment.