Skip to content

Commit

Permalink
Pypi release action
Browse files Browse the repository at this point in the history
  • Loading branch information
inquilabee committed Nov 24, 2024
1 parent d4065ef commit 13cc3d6
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Build and publish python package

on:
push:
branches:
- main

permissions:
contents: read
release:
types: [published]

jobs:
deploy:
publish-service-client-package:
runs-on: ubuntu-latest

permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
- name: Publish PyPi package
uses: cadifyai/poetry-publish@v0.1.0
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Set PYPI token
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Build package
run: poetry build
- name: Publish package
run: poetry publish
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 13cc3d6

Please sign in to comment.