From 03241b0c831f4665fa6eb9561a7a1c50efc14db3 Mon Sep 17 00:00:00 2001 From: yiyuiii Date: Tue, 12 Dec 2023 16:50:08 +0800 Subject: [PATCH] Create build_upload.yml --- .github/workflows/build_upload.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_upload.yml diff --git a/.github/workflows/build_upload.yml b/.github/workflows/build_upload.yml new file mode 100644 index 0000000..2d1cf15 --- /dev/null +++ b/.github/workflows/build_upload.yml @@ -0,0 +1,35 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Build and Upload + +on: [push] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + - name: Build package + run: poetry build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}