Skip to content

Commit 9fce08c

Browse files
committed
feat: add release workflow
1 parent 8c9e987 commit 9fce08c

3 files changed

Lines changed: 67 additions & 34 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
tags:
8+
- "v*"
9+
pull_request:
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
name: Test
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements.txt
33+
pip install -r test-requirements.txt
34+
- name: Test with pytest
35+
run: |
36+
pytest --cov=better_auth
37+
38+
release:
39+
name: Release
40+
needs: test
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 3
43+
if: startsWith(github.ref, 'refs/tags/')
44+
permissions:
45+
contents: write
46+
id-token: write
47+
packages: write
48+
49+
concurrency:
50+
group: ${{ github.workflow }}-${{ github.ref }}-release
51+
cancel-in-progress: true
52+
53+
steps:
54+
- uses: actions/checkout@v6
55+
56+
- name: Install the latest version of uv
57+
uses: astral-sh/setup-uv@v7
58+
59+
- name: Build package
60+
run: make build
61+
62+
- name: Publish package to PyPI
63+
run: make publish
64+
env:
65+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

‎.github/workflows/python.yml‎

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# better-auth
22

33
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/chasenlab/better-auth-python/python.yml)
4+
![GitHub Release Date](https://img.shields.io/github/release-date/chasenlab/better-auth-python)
5+
![GitHub Release](https://img.shields.io/github/v/release/chasenlab/better-auth-python?&color=fff)
46

57
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
68
![Swagger](https://img.shields.io/badge/-Swagger-%23Clojure?style=for-the-badge&logo=swagger&logoColor=white)

0 commit comments

Comments
 (0)