Skip to content

Commit

Permalink
pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgayoso committed Aug 12, 2022
1 parent 697dcb9 commit 80a4194
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
tags:
- '*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
# will use ref/SHA that triggered it
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1.11

- name: Build project for distribution
run: poetry build

- name: Check Version
id: check-version
run: |
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
|| echo ::set-output name=prerelease::true
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish

0 comments on commit 80a4194

Please sign in to comment.