From d2e38f4c35349b05c9bbd3ac753efc9a96e0ab05 Mon Sep 17 00:00:00 2001 From: Fengrui-Liu Date: Thu, 11 May 2023 18:01:29 +0800 Subject: [PATCH] poetry publish workflow --- .github/workflows/python-publish.yml | 29 +++++++--------------------- .github/workflows/testing.yml | 2 +- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 0e953b8..ac0521e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -17,28 +17,13 @@ permissions: jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Install twine to check the package - run: pip install twine - - name: Check the package - run: twine check dist/* - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - verbose: true + - uses: actions/checkout@v3 + - name: Build and publish to PyPI + uses: JRubics/poetry-publish@v1.16 + with: + user: __token__ + pypi_token: ${{ secrets.PYPI_API_TOKEN }} + verbose: true diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index acda0ab..d3553b0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] python-version: ["3.8", "3.9", "3.10", "3.11"] poetry-version: ["1.4.2"] runs-on: ${{ matrix.os }}