Skip to content

Commit f8728c6

Browse files
authored
Merge pull request #76 from posit-dev/ci-release-pypi
ci: fix PyPI release workflow
2 parents 4679ff1 + b18351e commit f8728c6

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/ci_build.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,3 @@ jobs:
5959
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
6060
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
6161
NETLIFY_SITE_NAME: ${{ secrets.NETLIFY_SITE_NAME }}
62-
63-
release-pypi:
64-
name: "Release to PyPI"
65-
runs-on: ubuntu-latest
66-
if: github.event_name == 'release' && github.event.workflow_run.conclusion == 'success'
67-
permissions:
68-
id-token: write
69-
steps:
70-
- uses: actions/checkout@v4
71-
- name: "Set up Python"
72-
uses: actions/setup-python@v5
73-
with:
74-
python-version: "3.9"
75-
- name: "Build Package"
76-
run: |
77-
python -m pip install build wheel
78-
python -m build --sdist --wheel
79-
- name: "Deploy to PyPI"
80-
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/ci_tests.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,23 @@ jobs:
3535
- name: Test
3636
run: |
3737
uv run pytest
38+
39+
release-pypi:
40+
name: "Release to PyPI"
41+
runs-on: ubuntu-latest
42+
if: github.event_name == 'release'
43+
needs: [test]
44+
permissions:
45+
id-token: write
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: "Set up Python"
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.9"
52+
- name: "Build Package"
53+
run: |
54+
python -m pip install build wheel
55+
python -m build --sdist --wheel
56+
- name: "Deploy to PyPI"
57+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)