Skip to content

Commit 93b7b7b

Browse files
authored
feat: add GitHub Actions workflow for publishing OceanBase SQLAlchemy plugin (#8)
1 parent 931e83d commit 93b7b7b

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish OceanBase SQLAlchemy Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- 'release_oceanbase_sqlalchemy_*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
27+
- name: Build package
28+
run: |
29+
rm -rf dist
30+
mkdir -p dist
31+
python -m build ./oceanbase-sqlalchemy-plugin -o dist
32+
33+
- name: Upload dists
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: release-dists
37+
path: dist/
38+
39+
pypi-publish:
40+
runs-on: ubuntu-latest
41+
needs:
42+
- release-build
43+
permissions:
44+
id-token: write
45+
46+
steps:
47+
- name: Retrieve release distributions
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: release-dists
51+
path: dist/
52+
53+
- name: Publish release distributions to PyPI
54+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)