Skip to content

Commit

Permalink
Add workflow for publishing to Test PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewryanscott committed Feb 23, 2025
1 parent e644e86 commit 34e8819
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release to Test PyPI

on:
workflow_dispatch:

jobs:
pypi-publish:
name: Publish release to Test PyPI
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/sunvox-dll-python
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }}

- name: Build package
run: uv build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
6 changes: 0 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ on:
types: [created]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/python-tests.yml@main

pypi-publish:
needs: test
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
Expand Down

0 comments on commit 34e8819

Please sign in to comment.