version 5.3 #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Releases | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
wait: | |
name: Wait for tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: fountainhead/[email protected] | |
id: wait-for-tests | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: Tests done | |
ref: ${{ github.sha }} | |
timeoutSeconds: 3600 | |
- name: Fail the Build | |
uses: cutenode/action-always-fail@v1 | |
if: steps.wait-for-tests.outputs.conclusion != 'success' | |
build: | |
name: Build package | |
runs-on: ubuntu-latest | |
needs: [wait] | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-python-${{ matrix.python }}-pip-${{ hashFiles('**/requirements*.txt') }}-git-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-python-${{ matrix.python }}-pip-${{ hashFiles('**/requirements*.txt') }} | |
${{ runner.os }}-python-${{ matrix.python }}-pip- | |
${{ runner.os }}-python | |
${{ runner.os }}- | |
- name: Upgrade pip and install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools wheel | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Build package | |
run: python -m build | |
- name: Check package | |
run: twine check dist/* | |
- name: Publish package | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload --skip-existing dist/* | |
release: | |
name: Release version | |
runs-on: ubuntu-latest | |
needs: [wait, build] | |
steps: | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false |