Skip to content

Commit

Permalink
Merge pull request #13 from coreruleset/chore/set-pypi-test-release
Browse files Browse the repository at this point in the history
chore: add test release to pypi
  • Loading branch information
fzipi authored Feb 18, 2025
2 parents 51b8c39 + 4d8b485 commit fd61e60
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ on:

jobs:
test:
name: Test Release
name: Release
runs-on: ubuntu-latest
steps:
- name: Publish to pypi
uses: coveooss/[email protected]
- uses: actions/checkout@v4

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
project-name: secrules-parsing
pypi-token: ${{ secrets.PYPI_TOKEN }}
pre-release: ${{ github.ref != 'refs/heads/master' }}
dry-run: ${{ github.ref != 'refs/heads/master' && github.event.inputs.publish != 'true' }}
version: "0.6.1"

- name: Publish
run: |
uv build
uv publish --index testpypi
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ version_variable = "pyproject.toml:version"
requires = ["hatchling"]
build-backend = "hatchling.build"

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple/"
publish-url = "https://pypi.org/legacy/"

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"

0 comments on commit fd61e60

Please sign in to comment.