Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bsod90 authored Sep 20, 2023
1 parent 9a6f3b8 commit a94d5b9
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,39 @@ name: Upload Python Package
on:
push:
tags:
- "v*.*.*"
- '[0-9]+.[0-9]+.[0-9]'

permissions:
contents: read
id-token: write

jobs:
deploy:
build-and-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
python_version: 3.9
pypi_token: ${{ secrets.PYPI_TOKEN }}
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-create: false

- name: Update version (kept at 0.0.0) in pyproject.toml and build
run: |
poetry version ${{ github.ref_name }}
poetry build
- name: Mint token
id: mint
uses: tschm/[email protected]

- name: Publish the package with poetry
run: |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'

0 comments on commit a94d5b9

Please sign in to comment.