Skip to content

Commit

Permalink
Merge pull request #74 from kadirnar/pypi-ci
Browse files Browse the repository at this point in the history
ci: 🎉 pypi release github action added
  • Loading branch information
onuralpszr authored Jun 26, 2023
2 parents 3a87480 + f500831 commit bf29f7c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MetaSeg Release to PyPi
on:
push:
tags:
- 'v[0-9]+.[0-9]+[0-9]+'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v3.5.3

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

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_METASEG_API_KEY }}

0 comments on commit bf29f7c

Please sign in to comment.