Skip to content

Commit

Permalink
Add a PyPI publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Aug 31, 2024
1 parent 2fc0645 commit ae9446f
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Upload To PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
pypi-publish:

runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build uv
uv pip install -r requirements-dev.txt
- name: Build package
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ htmlcov
.coverage

*.egg-info
dist/

venv
.python-version
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ any other file containing JSX.
## Supported grammar

The full [JSX grammar](https://facebook.github.io/jsx/) is supported.
Here are a few example:
Here are a few examples:

### Normal and self-closing tags

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dynamic = ["version"]
[project.optional-dependencies]
dev = [
"build",
"twine",
"uv",
"pytest",
"pytest-snapshot",
Expand Down
33 changes: 33 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml --extra dev -o requirements-dev.txt
build==1.2.1
# via python-jsx (pyproject.toml)
coverage==7.6.1
# via pytest-cov
iniconfig==2.0.0
# via pytest
nodeenv==1.9.1
# via pyright
packaging==24.1
# via
# build
# pytest
pluggy==1.5.0
# via pytest
pyproject-hooks==1.1.0
# via build
pyright==1.1.378
# via python-jsx (pyproject.toml)
pytest==8.3.2
# via
# python-jsx (pyproject.toml)
# pytest-cov
# pytest-snapshot
pytest-cov==5.0.0
# via python-jsx (pyproject.toml)
pytest-snapshot==0.9.0
# via python-jsx (pyproject.toml)
ruff==0.6.3
# via python-jsx (pyproject.toml)
uv==0.4.1
# via python-jsx (pyproject.toml)
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml -o requirements.txt

0 comments on commit ae9446f

Please sign in to comment.