This repository has been archived by the owner on Nov 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/naveen521kk/img2pdf
- Loading branch information
Showing
1 changed file
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |