Skip to content

Commit

Permalink
ci: Clean up publishing workflows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
timmc-edx committed Aug 9, 2024
1 parent 1345db5 commit 38437d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
name: Publish package to PyPi
name: Publish package to PyPI

on:
push:
tags:
- '*'

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

- 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__
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
@@ -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__
Expand Down

0 comments on commit 38437d4

Please sign in to comment.