Skip to content

Commit

Permalink
Use separate upload step
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed May 30, 2024
1 parent 2b7bb03 commit fed5f55
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ jobs:
- build_sdist_python_wheel
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
environment:
name: PyPI
url: https://pypi.org/project/mypy-dev/
permissions:
contents: write # Required to upload release assets
steps:
Expand All @@ -158,13 +155,6 @@ jobs:
pattern: dist-*
path: dist
merge-multiple: true
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Install twine
run: |
pip install twine
- name: Release
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -202,6 +192,29 @@ jobs:
data: await fs.readFile(`./dist/${file}`)
});
}
upload:
name: Upload release to PyPI
needs:
- release
runs-on: ubuntu-latest
environment:
name: PyPI
url: https://pypi.org/project/mypy-dev/
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Install twine
run: |
pip install twine
- name: Upload to PyPI
env:
TWINE_REPOSITORY: pypi
Expand Down

0 comments on commit fed5f55

Please sign in to comment.