From 70711443aa1eb9389c5753cebbb725d8084d26d7 Mon Sep 17 00:00:00 2001 From: H2Sxxa Date: Fri, 15 Mar 2024 15:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20add=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ tests/__init__.py | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..796b2a9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: PYPI Publish + +on: + release: + types: [created] + +jobs: + pypi-publish: + name: Test Lib & Publish + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - uses: pdm-project/setup-pdm@v3 + with: + version: 'head' + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Setup & Publish Lib + run: | + pdm install -G all + - name: Publish package distributions to PyPI + run: pdm publish \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py index 74f9b7d..d9879b7 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -from . import intercept as intercept +import intercept as intercept