Skip to content

Commit

Permalink
ci: add python pkg publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
Undertone0809 committed Apr 19, 2024
1 parent e86e3bd commit 3694fe9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://testdriven.io/tips/810f9bb5-c9df-479d-baa4-290c7e0779f1/
# https://github.com/abatilo/actions-poetry

name: Release Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
publish:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
poetry-version: [1.7.1]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Publish
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_API_TOKEN
poetry publish --build

0 comments on commit 3694fe9

Please sign in to comment.