Giter Club home page Giter Club logo

poetry-publish's Introduction

poetry-publish

An action to build and publish python package to pypi (https://pypi.org/) using poetry (https://github.com/sdispater/poetry).

Inputs

python_version

The version of python to install (default: latest). Use default for a shorter build time.

poetry_version

The version of poetry to install (default: latest).

pypi_token

Required API token to authenticate when uploading package to PyPI (https://pypi.org/manage/account/).

repository_name

The name of a repository where we will upload the package. Necessary if you'd like to upload to test PyPi or a private wheels repo. Uploads to official PyPi if not informed.

repository_url

The URL where the package will be uploaded. Necessary if you'd like to upload to test PyPi or a private wheels repo. Uploads to official PyPi if not informed.

Example usage

The following will build and publish the pyhon package using the last version of python and poetry. Specify the python package version and dependencies in pyproject.toml in the root directory of your project.

- name: Build and publish to pypi
  uses: JRubics/poetry-publish@v1
  with:
    pypi_token: ${{ secrets.PYPI_TOKEN }}

Python and poetry versions can be specified in inputs.

- name: Build and publish to pypi
  uses: JRubics/poetry-publish@v1
  with:
    python_version: '3.7.1'
    poetry_version: '==1.0.5'  # (PIP version specifier syntax)
    pypi_token: ${{ secrets.PYPI_TOKEN }}
    repository_name: 'testpypi'
    repository_url: 'https://test.pypi.org/legacy/'

Example workflow

The following will build and publish the pyhon package when project is tagged in the v*.*.* form.

name: Python package
on:
  push:
    tags:
      - 'v*.*.*'
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build and publish to pypi
      uses: JRubics/poetry-publish@v1
      with:
        pypi_token: ${{ secrets.PYPI_TOKEN }}

poetry-publish's People

Contributors

jrubics avatar vinigfer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.