bump v1.1.2 (#78) #32
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: Release to PyPI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'pyproject.toml' | |
env: | |
POETRY_VERSION: "1.6.1" | |
jobs: | |
if_release: | |
if: | | |
${{ github.event.pull_request.merged == true }} | |
&& ${{ contains(github.event.pull_request.labels.*.name, 'release') }} | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
environment: | |
name: release | |
url: https://pypi.org/p/zep-python | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry==$POETRY_VERSION | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "poetry" | |
- name: Build project for distribution | |
run: poetry build | |
- name: Check Version | |
id: check-version | |
run: | | |
echo version=$(poetry version --short) >> $GITHUB_OUTPUT | |
- uses: rickstaa/action-create-tag@v1 | |
id: "tag_create" | |
with: | |
tag: v${{ steps.check-version.outputs.version }} | |
tag_exists_error: false | |
message: "Latest release" | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/*" | |
makeLatest: true | |
draft: false | |
generateReleaseNotes: true | |
tag: v${{ steps.check-version.outputs.version }} | |
commit: main | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |