Skip to content

Dev (#51)

Dev (#51) #30

Workflow file for this run

name: build & release
on:
push:
branches:
- "master"
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents : write
strategy:
matrix:
python-versions: ['3.10']
outputs:
package_version: ${{ steps.variables_step.outputs.package_version }}
package_name: ${{ steps.variables_step.outputs.package_name }}
repo_name: ${{ steps.variables_step.outputs.repo_name }}
repo_owner: ${{ steps.variables_step.outputs.repo_owner }}
steps:
- uses: actions/checkout@v3
- name: build change log
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-versions }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox-gh-actions poetry
- name: Declare variables for convenient use
id: variables_step
run: |
echo "::set-output name=repo_owner::${GITHUB_REPOSITORY%/*}"
echo "::set-output name=repo_name::${GITHUB_REPOSITORY#*/}"
echo "::set-output name=package_name::$(poetry version | awk '{print $1}')"
echo "::set-output name=package_version::$(poetry version --short)"
shell: bash
- name: Build wheels and source tarball
run: |
poetry lock
poetry build
- name: Publish to PYPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true