Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen521kk committed Oct 6, 2021
2 parents c4ac5b8 + 0ce916f commit 6b36d89
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package
name: Publish Release

on:
push:
tags:
- 'v*.*.*'
branches:
- master
release:
types: [released]

jobs:
build:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
pypi_token: ${{ secrets.PYPI_API_KEY }}
python-version: 3.8

- name: Install dependencies
run: python -m pip install --upgrade poetry

# TODO: Set PYPI_API_TOKEN to api token from pip in secrets
- name: Configure pypi credentials
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_KEY }}
run: poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN"

- name: Publish release to pypi
run: |
poetry publish --build
poetry build

0 comments on commit 6b36d89

Please sign in to comment.