Skip to content

Commit

Permalink
Merge pull request #24 from tigrisdata/main
Browse files Browse the repository at this point in the history
Beta release
  • Loading branch information
adilansari authored May 19, 2023
2 parents 17189f6 + 4914238 commit 7e9b3c8
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- main
workflow_call:


jobs:
lint:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: release
on:
push:
branches:
- "release/stable"
- "release/beta"
- "release/next"

permissions:
contents: read # for checkout

jobs:
build:
uses: ./.github/workflows/ci.yml
release-dry-run:
needs: build
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install semantic release
run: npm install --no-save semantic-release @semantic-release/exec conventional-changelog-conventionalcommits
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies if cache miss
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install dependencies if poetry.lock changed
run: poetry install --no-interaction
- name: Compile proto to generate API stubs
run: |
source $VENV
poetry run make generate
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_REPO: "https://upload.pypi.org/legacy/"
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
source $VENV
npx semantic-release --debug
52 changes: 52 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"branches": [
"release/stable",
{
"name": "release/beta",
"channel": "beta",
"prerelease": "beta"
},
{
"name": "release/next",
"channel": "next",
"prerelease": "rc"
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "if [ 403 != $(curl -X POST -F \":action=file_upload\" -u __token__:$PYPI_TOKEN -s -o /dev/null -w \"%{http_code}\" $PYPI_REPO) ]; then (exit 0); else (echo \"Authentication error. Please check the PYPI_TOKEN environment variable.\" && exit 1); fi",
"prepareCmd": "poetry version ${nextRelease.version}",
"publishCmd": "poetry config repositories.repo $PYPI_REPO && poetry publish --build --repository repo --username __token__ --password $PYPI_TOKEN --no-interaction -vvv"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "dist/*.tar.gz",
"label": "sdist"
},
{
"path": "dist/*.whl",
"label": "wheel"
}
]
}
]
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Python client for Tigris

## Installation

```commandline
pip install tigris-client-python>=1.0.0.b1
```

# Usage

See reference implementation in `./tests` directory that uses Tigris on `localhost:8081`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Tigris team <[email protected]>"]
repository = "https://www.github.com/tigrisdata/tigris-client-python"
documentation = "https://www.tigrisdata.com/docs/"
classifiers = [
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Database"
Expand Down
2 changes: 1 addition & 1 deletion reviewpad.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Define the list of rules to be used by Reviewpad.
rules:
- name: is-release-branch
spec: $base() == "beta" || $base() == "alpha" || $base() == "release"
spec: $base() == "release/beta" || $base() == "release/stable" || $base() == "release/next"
- name: is-main-branch
spec: $base() == "main"

Expand Down

0 comments on commit 7e9b3c8

Please sign in to comment.