github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/clients/python/.github/workflows/release.yml (about)

     1  name: release
     2  
     3  on:
     4    push:
     5      tags:
     6        - '*'
     7  
     8  jobs:
     9    release:
    10      runs-on: ubuntu-latest
    11      steps:
    12        - name: Checkout
    13          uses: actions/checkout@v2
    14        - name: Version
    15          id: version
    16          run: |
    17            echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
    18        - name: Set up Python 3.8
    19          uses: actions/setup-python@v2
    20          with:
    21            python-version: 3.8
    22        - name: Build package
    23          run: bash ./.github/workflows/release.sh -xe
    24          env:
    25            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    26            VERSION: ${{ steps.version.outputs.VERSION }}
    27        - name: Publish a Python distribution to PyPI
    28          uses: pypa/gh-action-pypi-publish@bea5cda687c2b79989126d589ef4411bedce0195 # pin@master
    29          with:
    30            user: __token__
    31            password: ${{ secrets.PYPI_TOKEN }}