diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..de00174 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,55 @@ +name: Publish Pypi Package + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + name: Build distribution + + steps: + - name: Cloning repo + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Build binary wheel and a source tarball + run: make build + + - name: Upload distribution artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + runs-on: ubuntu-latest + name: Publish to PyPI + needs: build + environment: pypi + permissions: + id-token: write + contents: write + + steps: + - name: Download distribution artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish Package to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Upload dist to GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "${{ github.ref_name }}" dist/* --repo "${{ github.repository }}" diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..dfd45d5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,18 @@ +Copyright (c) 2026 Bullet Train Ltd (https://www.flagsmith.com/) and individual contributors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile b/Makefile index 8003311..9345374 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,10 @@ test: ## Run unit tests. Override scope with opts, e.g. `make test opts='-m engi typecheck: ## Run mypy uv run mypy +.PHONY: build +build: ## Build the sdist and wheel into dist/ + uv build + .PHONY: help help: @echo "Usage: make [target]" diff --git a/pyproject.toml b/pyproject.toml index b0f9733..fdd4057 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "flagsmith-sql-flag-engine" -version = "0.1.0a2" +version = "0.1.0" description = "SQL translator for Flagsmith segment predicates." readme = "README.md" authors = [{ name = "Flagsmith", email = "engineering@flagsmith.com" }] diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..bf4dccf --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,62 @@ +{ + "bootstrap-sha": "3a6a175", + "packages": { + ".": { + "release-type": "python", + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false, + "include-component-in-tag": false + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "changelog-sections": [ + { + "type": "feat", + "hidden": false, + "section": "Features" + }, + { + "type": "fix", + "hidden": false, + "section": "Bug Fixes" + }, + { + "type": "ci", + "hidden": false, + "section": "CI" + }, + { + "type": "docs", + "hidden": false, + "section": "Docs" + }, + { + "type": "deps", + "hidden": false, + "section": "Dependency Updates" + }, + { + "type": "perf", + "hidden": false, + "section": "Performance Improvements" + }, + { + "type": "refactor", + "hidden": false, + "section": "Refactoring" + }, + { + "type": "test", + "hidden": false, + "section": "Tests" + }, + { + "type": "chore", + "hidden": false, + "section": "Other" + } + ] +}