You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2022/04/04 17:24:21 UTC

[thrift] branch ci/pypi-automation created (now a9294bb20)

This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch ci/pypi-automation
in repository https://gitbox.apache.org/repos/asf/thrift.git


      at a9294bb20 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip]

This branch includes the following new commits:

     new a9294bb20 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip]

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[thrift] 01/01: THRIFT-5546 automate pypi publishing on pre-release and release [ci skip]

Posted by jk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch ci/pypi-automation
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit a9294bb20a058079b8d7812febeeb6f4edc3eae3
Author: James E. King III <jk...@apache.org>
AuthorDate: Mon Apr 4 13:17:57 2022 -0400

    THRIFT-5546 automate pypi publishing on pre-release and release [ci skip]
---
 .github/workflows/publish.yml | 46 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 000000000..d4468abfe
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,46 @@
+#
+# Apache Thrift release publishing workflow
+#
+# When a release is created in GitHub, it should be created in pre-release
+# mode first.  This will trigger a "prereleased" event which will cause this
+# workflow to run and publish packages to various package managers.  You
+# must check the Actions tab in GitHub to see the result of the workflow.
+#
+# github.event.action is either "prereleased" or "released" and corresponds
+# with a named environment in CloudTruth
+#
+#           |         Destinations
+# Language  | Prereleased   | Released
+# ----------+---------------+---------------
+# py        | test.pypi.org | pypi.org
+#
+---
+name: Publish
+
+on:
+  release:
+    types:
+      - prereleased
+      - released
+
+jobs:
+  pypi:
+    runs-on: ubuntu-latest
+    timeout-minutes: 5
+
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v3
+      - uses: cloudtruth/configure-action@v2
+        with:
+          apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}"
+          project: "${{ github.repository }}"
+          environment: "${{ github.event.action }}"
+      - name: build sdist
+        run: python setup.py sdist
+      - name: "Publish to PyPI"
+        uses: pypa/gh-action-pypi-publish@release/v1
+        with:
+          user: "${{ env.PYPI_USERNAME }}"
+          password: "${{ env.PYPI_PASSWORD }}"
+          repository_url: "${{ env.PYPI_REPOSITORY }}"