Skip to content

Enforce a minimum version of argcomplete #24

Enforce a minimum version of argcomplete

Enforce a minimum version of argcomplete #24

Workflow file for this run

# Match release tags on master branch
name: Release
on:
push:
branches:
- master
tags:
# Matches 1.2.3 and 1.2.3.4
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9].+[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
name: Build release package
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@master
name: Setup Python 3.8
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install -U poetry
- name: Build Package
id: build_package
run: |
rm -rf dist
poetry build
cd dist
echo "::set-output name=source::$(ls *.tar.gz)"
echo "::set-output name=wheel::$(ls *.whl)"
echo "::set-output name=version::$(poetry version -s)"
- name: Create a Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.build_package.outputs.version }}
release_name: Release ${{ steps.build_package.outputs.version }}
prerelease: false
- name: Upload Release Wheel
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ steps.build_package.outputs.wheel }}
asset_name: ${{ steps.build_package.outputs.wheel }}
asset_content_type: application/x-pywheel+zip
- name: Upload Release Source
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ steps.build_package.outputs.source }}
asset_name: ${{ steps.build_package.outputs.source }}
asset_content_type: application/x-tar+gzip
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}