From a3ff17f75ff8bd89659add8b40dccb98a7c1716b Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 15 Jul 2024 12:58:45 -0700 Subject: [PATCH 1/4] bug: [Consolidate publishing and signing distributions into one step] --- .github/workflows/publish.yml | 57 +++++++++-------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff814c6..d2c3b0d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,6 +34,7 @@ jobs: publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI + and Sign with Sigstore if: startsWith(github.ref, 'refs/tags/') needs: - build @@ -43,6 +44,7 @@ jobs: url: https://pypi.org/p/eppo-server-sdk permissions: id-token: write + contents: write steps: - name: Download all the dists @@ -52,46 +54,15 @@ jobs: path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - github-release: - name: >- - Sign the Python 🐍 distribution 📦 with Sigstore - and upload them to GitHub Release - needs: - - publish-to-pypi - runs-on: ubuntu-latest - - permissions: - contents: write - id-token: write - - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v2.1.1 - with: - inputs: >- - ./dist/*.tar.gz - ./dist/*.whl - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release create - '${{ github.ref_name }}' - --repo '${{ github.repository }}' - --notes "" - - name: Upload artifact signatures to GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - # Upload to GitHub Release using the `gh` CLI. - # `dist/` contains the built packages, and the - # sigstore-produced signatures and certificates. - run: >- - gh release upload - '${{ github.ref_name }}' dist/** - --repo '${{ github.repository }}' + - name: Sign the dists with Sigstore + uses: sigstore/gh-action-sigstore-python@v2.1.1 + with: + inputs: >- + ./dist/*.tar.gz + ./dist/*.whl + - name: Update GitHub Release and Upload Artifacts + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + gh release edit '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes "" + gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' From f7b0fda56babbb3cf81fd952976f60be4d5923a8 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 15 Jul 2024 13:08:24 -0700 Subject: [PATCH 2/4] do not edit github release --- .github/workflows/publish.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d2c3b0d..ab3f24d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,10 +1,8 @@ name: Publish to PyPi on: - push: - tags: - - 'v*' - workflow_dispatch: + release: + types: [published] jobs: build: @@ -60,9 +58,3 @@ jobs: inputs: >- ./dist/*.tar.gz ./dist/*.whl - - name: Update GitHub Release and Upload Artifacts - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - gh release edit '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes "" - gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' From 94bad67b94db94798da35630f286f8deabbd7b2a Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 15 Jul 2024 13:09:50 -0700 Subject: [PATCH 3/4] contriib --- CONTRIBUTING.md | 0 README.md | 4 ++++ 2 files changed, 4 insertions(+) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index c795c41..a4d944a 100644 --- a/README.md +++ b/README.md @@ -129,3 +129,7 @@ response = JSONResponse(content={"flagConfigurations": flag_config_json}) ## Philosophy Eppo's SDKs are built for simplicity, speed and reliability. Flag configurations are compressed and distributed over a global CDN (Fastly), typically reaching your servers in under 15ms. Server SDKs continue polling Eppo’s API at 30-second intervals. Configurations are then cached locally, ensuring that each assignment is made instantly. Evaluation logic within each SDK consists of a few lines of simple numeric and string comparisons. The typed functions listed above are all developers need to understand, abstracting away the complexity of the Eppo's underlying (and expanding) feature set. + +## Contributing + +To publish a new version of the SDK, set the version as desired in `eppo_client/version.py`, then create a new Github release. The CI/CD configuration will handle the build and publish to PyPi. From ba8df8849015cf05666ff9a9d265081ec2e5465f Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 15 Jul 2024 19:02:21 -0700 Subject: [PATCH 4/4] workflow_dispatch: --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ab3f24d..89eee6c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,7 @@ name: Publish to PyPi on: release: types: [published] + workflow_dispatch: jobs: build: