Skip to content

Commit

Permalink
Rewrite publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
szastupov committed Mar 12, 2023
1 parent 37073d3 commit d8a2929
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/publish.yml
@@ -1,15 +1,31 @@
name: Publish
name: Build and Publish

on:
push:
branches:
- master
release:
types:
- created

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

steps:
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.7.1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v3
with:
password: ${{ secrets.PYPI_API_TOKEN }}
python-version: "3.11"

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

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit d8a2929

Please sign in to comment.