Skip to content

Commit

Permalink
Merge pull request #41 from cfpb/pypi-api-keys
Browse files Browse the repository at this point in the history
Update PyPI Publishing and GitHub Actions versions
  • Loading branch information
willbarton authored Jan 2, 2024
2 parents 14061f5 + d08d39b commit 46dd6ee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish to PyPI
on:
on:
release:
types: [published]
workflow_dispatch:
Expand All @@ -8,20 +8,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
pip install twine wheel
- name: Build the package
run: |
python -m build
- name: Upload to PyPI
run: twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_KEY }}
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand All @@ -36,10 +36,10 @@ jobs:
wagtail: ['5.1', '5.2']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -55,9 +55,9 @@ jobs:
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}

- name: Store test coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage-${{ matrix.python }}-${{ matrix.django }}-${{ matrix.wagtail }}
path: .coverage.*

coverage:
Expand All @@ -67,7 +67,7 @@ jobs:
- test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -82,9 +82,9 @@ jobs:
pip install tox
- name: Retrieve test coverage
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: coverage
merge-multiple: true

- name: Check coverage
run: tox -e coverage

0 comments on commit 46dd6ee

Please sign in to comment.