Skip to content

Release

Release #41

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [ "Release file check" ]
branches: [ master, main ]
types:
- completed
jobs:
deploy:
name: Deploy
environment: Deployment
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' && github.event.action == 'released' && github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install deps
run: |
python -m pip install pip --upgrade
python -m pip install poetry githubrelease httpx==0.18.2 autopub poetry
- name: Check if we should release
id: check_release
run: |
set +e
echo ::set-output name=release::$(autopub check)
- name: Publish
if: steps.check_release.outputs.release == ''
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
git remote set-url origin https://${{ secrets.BOT_TOKEN }}@github.com/${{ github.repository }}
autopub prepare
poetry build
autopub commit
poetry publish --username=__token__