From 0c180e1c3cca47960a85d4053ed8ecde97d51454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Tue, 21 May 2024 09:06:41 +0200 Subject: [PATCH] actions: pipy publish package use poetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny MarieĢthoz --- .github/workflows/pypi-publish.yml | 25 ++++++++++--------------- .github/workflows/tests.yml | 6 +++--- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 97ffa66..f5dbb54 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -26,23 +26,18 @@ on: jobs: build-n-publish: runs-on: ubuntu-latest + environment: pypi steps: - uses: actions/checkout@v2 - - name: Set up Python 3.7 + + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.7 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel babel - - name: Build package + python-version: 3.9 + + - name: Install Poetry + uses: snok/install-poetry@v1 + + - name: poetry-publish run: | - python setup.py compile_catalog sdist bdist_wheel - - name: pypi-publish - uses: pypa/gh-action-pypi-publish@v1.3.1 - with: - user: __token__ - - password: ${{ secrets.pypi_token }} - + poetry publish --build -u __token__ -p ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c5a1a5f..3ccc3dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ on: pull_request: branches: - main - - "staging" + - staging schedule: # * is a special character in YAML so you have to quote this string - cron: "0 3 * * 6" @@ -78,5 +78,5 @@ jobs: run: | poetry run ./run-tests.sh - - name: Run build - run: poetry build + - name: Test publish in dry run mode + run: poetry publish --build --dry-run