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 19:07:50 UTC

[thrift] branch ci/pypi-automation updated (bde8a84da -> f15550d1a)

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


    omit bde8a84da THRIFT-5546: automate pypi publishing [ci skip]
     new f15550d1a THRIFT-5546: automate pypi publishing [ci skip]

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (bde8a84da)
            \
             N -- N -- N   refs/heads/ci/pypi-automation (f15550d1a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .github/workflows/publish.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


[thrift] 01/01: THRIFT-5546: automate pypi publishing [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 f15550d1add5c486a1ae0bb7287d0c62f38f82bf
Author: James E. King III <jk...@apache.org>
AuthorDate: Mon Apr 4 13:17:57 2022 -0400

    THRIFT-5546: automate pypi publishing [ci skip]
    
    When a pre-release is created on GitHub for the repo it will publish
    to the TestPyPI service, and if that pre-release is promoted to a
    release, it will publish to the PyPI (real) service.
---
 .github/actions/cloudtruth/configure-action |  1 +
 .github/actions/pypa/gh-action-pypi-publish |  1 +
 .github/workflows/publish.yml               | 52 +++++++++++++++++++++++++++++
 .gitmodules                                 |  6 ++++
 4 files changed, 60 insertions(+)

diff --git a/.github/actions/cloudtruth/configure-action b/.github/actions/cloudtruth/configure-action
new file mode 160000
index 000000000..9ec7a0ab1
--- /dev/null
+++ b/.github/actions/cloudtruth/configure-action
@@ -0,0 +1 @@
+Subproject commit 9ec7a0ab1c6e1bf92620c4a1b3fd38c614dc1659
diff --git a/.github/actions/pypa/gh-action-pypi-publish b/.github/actions/pypa/gh-action-pypi-publish
new file mode 160000
index 000000000..717ba43cf
--- /dev/null
+++ b/.github/actions/pypa/gh-action-pypi-publish
@@ -0,0 +1 @@
+Subproject commit 717ba43cfbb0387f6ce311b169a825772f54d295
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 000000000..5bc73a014
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,52 @@
+#
+# 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
+
+permissions:
+  contents: read
+
+jobs:
+  pypi:
+    runs-on: ubuntu-latest
+    timeout-minutes: 5
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          persist-credentials: false
+          submodules: recursive
+      - uses: actions/setup-python@v3
+      - name: Get configuration and secrets from CloudTruth
+        uses: ./.github/actions/cloudtruth/configure-action
+        with:
+          apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}"
+          project: "${{ github.repository }}"
+          environment: "${{ github.event.action }}"
+      - name: build sdist
+        run: "cd lib/py && python setup.py sdist"
+      - name: Publish to PyPI
+        uses: ./.github/actions/pypa/gh-action-pypi-publish
+        with:
+          password: "${{ env.PYPI_PASSWORD }}"
+          repository_url: "${{ env.PYPI_REPOSITORY }}"
+          packages_dir: lib/py/dist
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..bbaf357b3
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule ".github/actions/cloudtruth/configure-action"]
+	path = .github/actions/cloudtruth/configure-action
+	url = https://github.com/cloudtruth/configure-action
+[submodule ".github/actions/pypa/gh-action-pypi-publish"]
+	path = .github/actions/pypa/gh-action-pypi-publish
+	url = https://github.com/pypa/gh-action-pypi-publish