version: bump #90
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: Python package | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Lock api | |
run: poetry -C api/ lock | |
- name: Build and publish api to pypi | |
uses: JRubics/[email protected] | |
with: | |
pypi_token: ${{ secrets.PYPI_API_TOKEN }} | |
package_directory: "api" | |
allow_poetry_pre_release: "yes" | |
poetry_install_options: "--sync" | |
poetry_publish_options: "--skip-existing" | |
- name: Lock cli | |
run: | | |
while true; do | |
pypi_page=$(curl --silent -L "https://pypi.org/project/anipy-api") | |
if grep -q "${GITHUB_REF#refs/*/v}" <<< $pypi_page; then | |
break | |
fi | |
sleep 2 | |
done | |
poetry -C cli/ lock | |
- name: Build and publish cli to pypi | |
uses: JRubics/[email protected] | |
with: | |
pypi_token: ${{ secrets.PYPI_API_TOKEN }} | |
package_directory: "cli" | |
allow_poetry_pre_release: "yes" | |
poetry_install_options: "--sync" | |
poetry_publish_options: "--skip-existing" | |
- name: Lock root | |
run: poetry lock | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "ci: lock file update" | |
branch: master |