Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
bug: [Consolidate publishing and signing distributions into one step] (
Browse files Browse the repository at this point in the history
…#61)

* bug: [Consolidate publishing and signing distributions into one step]

* do not edit github release

* contriib

* workflow_dispatch:
  • Loading branch information
leoromanovsky authored Jul 16, 2024
1 parent d1b4fa7 commit ea46eb1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 46 deletions.
56 changes: 10 additions & 46 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Publish to PyPi

on:
push:
tags:
- 'v*'
release:
types: [published]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -34,6 +33,7 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
and Sign with Sigstore
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
Expand All @@ -43,6 +43,7 @@ jobs:
url: https://pypi.org/p/eppo-server-sdk
permissions:
id-token: write
contents: write

steps:
- name: Download all the dists
Expand All @@ -52,46 +53,9 @@ 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/[email protected]
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/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
Empty file removed CONTRIBUTING.md
Empty file.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit ea46eb1

Please sign in to comment.