Skip to content

Commit

Permalink
Create pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
isakruas authored Oct 3, 2024
1 parent 84d2103 commit bed83a9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Python Package

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install twine
python -m twine upload dist/*
permissions:
id-token: write
contents: read

0 comments on commit bed83a9

Please sign in to comment.