From d5997356470e8f6cd7b7f4b27075590b5fee87d3 Mon Sep 17 00:00:00 2001 From: "zongsi.zhang" Date: Mon, 29 Apr 2024 16:55:51 +0800 Subject: [PATCH] add verification for versions --- .github/README.md | 8 ++++++++ .github/workflows/pypi-publish.yaml | 22 +++------------------- 2 files changed, 11 insertions(+), 19 deletions(-) create mode 100644 .github/README.md diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000..fd81149 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,8 @@ +# Maintainer Guidance + +## Publish package to pypi +When we are ready to release a new version `vx.y.z`, one of the maintainers should: +1. Edit the `pyproject.toml` file, update the `[tool.poetry].version = vx.y.z` +2. Create a new tag `git tag vx.y.z`, if the tag doesn't match with the project version, step 4 validation will fail +3. push the tag to the repo `git push origin vx.y.z` +4. There will be a GitHub Action triggered automatically, which will build and publish to pypi \ No newline at end of file diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml index f38ef5a..149fe4a 100644 --- a/.github/workflows/pypi-publish.yaml +++ b/.github/workflows/pypi-publish.yaml @@ -6,22 +6,6 @@ on: jobs: pypi-publish: - name: Upload release to PyPI - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/airflow-providers-wherobots - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Poetry Build - run: | - poetry build - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + name: Publish package to Pypi + uses: wherobots/ci-tools/.github/workflows/poetry-pypi-publish.yaml/@main + secrets: inherit \ No newline at end of file