Skip to content

refactor(src): change repo name #30

refactor(src): change repo name

refactor(src): change repo name #30

name: Python package
on:
push:
branches:
- main
# tags:
# - "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
pip install poetry
poetry config virtualenvs.create false
- name: Commit Tag
run: |
poetry version patch
tag=$(poetry version | grep -Eo "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git tag "v${tag}"
git add .
git commit -m "Bump version to v${tag}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
- name: Build and publish to pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build