Skip to content

Commit

Permalink
Create publish action (#571)
Browse files Browse the repository at this point in the history
* Publish on tag-triggered actions

Co-authored-by: ItsDrike <itsdrike@protonmail.com>
  • Loading branch information
kevinkjt2000 and ItsDrike committed Jul 4, 2023
1 parent 856a0de commit cab2760
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to PyPi

on:
push:
tags:
# This pattern is not a typical regular expression, see:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "v*"

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

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

- name: Setup poetry
id: poetry_setup
uses: ItsDrike/setup-poetry@v1
with:
python-version: 3.11
install-args: "--with release"

- name: Build package
run: poetry build

- name: Publish package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --no-interaction

0 comments on commit cab2760

Please sign in to comment.