Skip to content

Commit

Permalink
Merge pull request #6 from Vastxiao/dev
Browse files Browse the repository at this point in the history
update asmysql
  • Loading branch information
Vastxiao authored Oct 13, 2024
2 parents d68aecd + 59bd31b commit a819860
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 44 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/python-publish.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/python_package_publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 通过 Github actions:
# 自动Python打包推送到PyPI
# Actions secrets配置:
# Repo -> Settings -> Actions secrets and variables -> Repository secrets
name: Publish Python 🐍 Package 📦 To PyPI


on:
# 手动触发
#workflow_dispatch:

# 在仓库push时触发
push:
#branches:
# - main

# 推送 tag 是 v*.*.*时触发
tags:
- "v*.*.*"

# 在release时触发
#release:
# types: [published]


# 设置工作流访问仓库的权限:只读。
permissions:
contents: read


jobs:
publish_python_package_to_pypi:
name: Publish Package To PyPI
# 只在推送tag时,才发布到 PyPI
#if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
# clone 仓库
- name: Checkout Code
uses: actions/checkout@v4

# 设置 Python环境和版本
- name: Setup Python 🐍
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build
run: |
#poetry self add "poetry-dynamic-versioning[plugin]"
[ -f dist ] && rm -rvf dist
poetry build
- name: Publish Distribution 📦 To PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# asmysql

* PyPI: https://pypi.org/project/asmysql/
* GitHub: https://github.com/vastxiao/asmysql
* Gitee: https://gitee.com/vastxiao/asmysql

## Introduction

asmysql is a library for using the MySQL asynchronous client, which is a wrapper for aiomysql.
Expand Down
4 changes: 4 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# asmysql

* PyPI: https://pypi.org/project/asmysql/
* GitHub: https://github.com/vastxiao/asmysql
* Gitee: https://gitee.com/vastxiao/asmysql

## 【简介】

asmysql是封装aiomysql的mysql异步客户端使用库。
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ version = "0.1.4"
description = "封装aiomysql的异步mysql客户端引擎。"
license = "MIT"
authors = ["vastxiao <vastxiao@gmail.com>"]
homepage = "https://github.com/Vastxiao/asmysql"
homepage = "https://pypi.org/project/asmysql/"
repository = "https://github.com/Vastxiao/asmysql"
documentation = "https://github.com/Vastxiao/asmysql/blob/main/README.md"
keywords = ["async", "asyncio", "mysql", "aiomysql"]
readme = "README.md"
include = ["CHANGELOG.md", "README_zh.md"]

[tool.poetry.urls]
"asmysql readme-zh" = "https://github.com/Vastxiao/asmysql/blob/main/README_zh.md"
"asmysql changelog" = "https://github.com/Vastxiao/asmysql/blob/main/CHANGELOG.md"
"Gitee Repo" = "https://gitee.com/vastxiao/asmysql"
"readme-zh" = "https://github.com/Vastxiao/asmysql/blob/main/README_zh.md"
"changelog" = "https://github.com/Vastxiao/asmysql/blob/main/CHANGELOG.md"
"vastxiao blog" = "https://vastxiao.github.io/"

[tool.poetry.dependencies]
Expand Down Expand Up @@ -43,3 +44,4 @@ priority = "primary"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit a819860

Please sign in to comment.