From 38437d4816c3452a0af39b51345225744748f4c8 Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Fri, 9 Aug 2024 15:05:14 +0000 Subject: [PATCH] ci: Clean up publishing workflows This is in prep for more substantive changes to the PyPI call. - Adjust formatting and naming, fix syntax (quote numeric string) - Remove some differences: Remove default x64 arch value; use newer LTS Ubuntu --- .github/workflows/publish.yml | 18 +++++++----------- .github/workflows/test_publish.yml | 12 +++++++----- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1c5ee6d..f8567ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish package to PyPi +name: Publish package to PyPI on: push: @@ -6,17 +6,13 @@ on: - '*' jobs: - - push: - runs-on: ubuntu-20.04 - + publish: + runs-on: ubuntu-22.04 steps: - - name: Checkout - uses: actions/checkout@v4 - - name: setup python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: '3.11' - name: Install pip run: pip install -r requirements/pip.txt @@ -24,7 +20,7 @@ jobs: - name: Build package run: python setup.py sdist bdist_wheel - - name: Publish to PyPi + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index c2837c3..8116ca6 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -1,22 +1,24 @@ -name: Test Publish +name: Test-publish package to PyPI on: pull_request: jobs: - testing: - runs-on: ubuntu-latest + test-publish: + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: '3.11' - architecture: x64 + - name: Install pip run: pip install -r requirements/pip.txt + - name: Build package run: python setup.py sdist bdist_wheel - - name: Test publish + + - name: Publish to PyPI (test server) uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__