Skip to content

Commit

Permalink
Configure test and publish github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper0406 committed Aug 20, 2024
1 parent 0f8500a commit 53d8d33
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to PyPi

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Install Hatch
uses: pypa/hatch@install
- name: Publish to PyPi
run: |
hatch publish -n -u __token__ -a ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Publish stablehlo-coreml to PyPi
name: Run Tests

on:
push:
Expand Down Expand Up @@ -39,6 +39,3 @@ jobs:
- name: Test with hatch
run: |
hatch run test:pytest tests
- name: Publishing to PyPi
run: |
hatch publish -n -u __token__ -a $PYPI_PUBLISH_TOKEN

0 comments on commit 53d8d33

Please sign in to comment.