Skip to content

Commit

Permalink
remove unused environment url, use setup-python-hatch, publish artifa…
Browse files Browse the repository at this point in the history
…cts dynamically
  • Loading branch information
MichelleArk committed Jan 29, 2024
1 parent 77b0861 commit c6deb51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
20 changes: 0 additions & 20 deletions .github/actions/setup-python-env/action.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.deploy-to }}
url: ${{ vars.PYPI_URL }}
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

Expand All @@ -40,7 +39,7 @@ jobs:
persist-credentials: false

- name: "Set up Python & Hatch - 3.11"
uses: ./.github/actions/setup-python-env
uses: ./.github/actions/setup-python-hatch
with:
python-version: "3.11"

Expand All @@ -52,7 +51,12 @@ jobs:
run: hatch run build:check-all
shell: bash

- name: Publish artifacts to PyPI
- name: Publish artifacts to PyPI Test
if: inputs.deploy-to == 'PypiTest'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish artifacts to PyPI Prod
if: inputs.deploy-to == 'PypiProd'
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c6deb51

Please sign in to comment.