From f91d415b2816e888f7306d0475aa4c4b992434c5 Mon Sep 17 00:00:00 2001 From: liwt31 Date: Mon, 15 Jan 2024 16:08:28 +0800 Subject: [PATCH] add pypi ci --- .github/workflows/ci.yml | 3 +++ .github/workflows/publish_pypi.yml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/publish_pypi.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e090797..43c69db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ jobs: python -m pip install --upgrade pip pip install --no-cache-dir -r requirements.txt pip install --no-cache-dir -r requirements-dev.txt + - name: check env + run : | + pip freeze - name: run black run: | black . --check --verbose || echo "return 0" diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000..1786379 --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,21 @@ +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/tencirchem + permissions: + id-token: write + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + cache: "pip" + - name: Build to sdist + run: | + python setup.py sdist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1