-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (36 loc) · 1.08 KB
/
release-cloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release Cloud SDK to PyPI
on:
release:
types: [published]
env:
POETRY_VERSION: "1.8.3"
jobs:
release:
runs-on: ubuntu-latest
if: github.event.release.target_commitish == 'main'
permissions:
id-token: write
contents: write
environment:
name: release
url: https://pypi.org/p/zep-cloud
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry==$POETRY_VERSION
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "poetry"
- name: Compare pyproject version with tag
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
if [ "$TAG_VERSION" != "v$(poetry version --short)" ]; then
echo "Tag version $TAG_VERSION does not match the project version $(poetry version --short)"
exit 1
fi
- name: Build project for distribution
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1