Skip to content

Commit

Permalink
CI: workflow for publishing to pypi.org
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfabbri committed Jun 13, 2024
1 parent bf38ebc commit 83af40e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .github/workflows/publish.yml
name: Publish python package
on: push
jobs:
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/interface-gen
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# retrieve your distributions here
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: .
run: pip install -r requirements.txt
- name: Install twine
working-directory: .
run: pip install twine
- name: Build package distributions
working-directory: .
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "interface_gen"
version = "0.0.13"
version = "0.0.14"
authors = [
{ name="Aaron Fabbri", email="[email protected]" },
]
Expand Down

0 comments on commit 83af40e

Please sign in to comment.