Skip to content

improved versioning #34

improved versioning

improved versioning #34

Workflow file for this run

name: Bump version
on:
pull_request:
types:
- closed
jobs:
bump_version_and_publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
run: pipx install poetry || pip install poetry
- name: Install dependencies
run: |
poetry lock --no-update
poetry install --with dev
- name: Verify tests
run: |

Check failure on line 30 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yaml

Invalid workflow file

You have an error in your yaml syntax on line 30
if ! gh run list --branch "${{ github.ref }}" --event push --workflow test.yml --json conclusion -q '[0].conclusion' | grep -q "success"; then
echo "Tests did not pass. Aborting."
exit 1
fi
- name: Bump version and push tag
if: success() # Only continue if all was successful till now
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{secrets.LIB_ML_PAT_CONTENT_ACCESS}}
DEFAULT_BUMP: patch
TAG_CONTEXT: branch
WITH_V: false
PRERELEASE: false
- name: Update files with new version
if: success() # Only continue if tagging was successful
run: poetry run bump-my-version replace --config-file pyproject.toml --new-version $(git describe --tags --abbrev=0)
- name: Build and publish to PyPI
if: success() # Only continue if version in files was updated
run: |
poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_KEY }}