Skip to content

Commit

Permalink
Updated test & build matrix to include Python 3.12 and use GitHub Act…
Browse files Browse the repository at this point in the history
…ions as a Trusted Publisher
  • Loading branch information
etrepum committed Oct 5, 2023
1 parent aeb63ee commit cf1367b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/build-and-deploy.yml
Expand Up @@ -27,12 +27,12 @@ jobs:

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.4
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_TEST_COMMAND: >-
python -m simplejson.tests._cibw_runner "{project}"
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
Expand Down Expand Up @@ -94,6 +94,11 @@ jobs:
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/simplejson/
permissions:
id-token: write
# upload to PyPI on every tag starting with 'v'
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')"
# alternatively, to publish when a GitHub Release is created, use the following rule:
Expand All @@ -104,16 +109,17 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
# To test: repository_url: https://test.pypi.org/legacy/
- uses: pypa/gh-action-pypi-publish@v1.8.10

upload_pypi_test:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
environment:
name: "testpypi"
url: https://test.pypi.org/p/simplejson/
permissions:
id-token: write
# upload to test PyPI on every tag starting with 'test-v'
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/test-v')"
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
Expand All @@ -123,8 +129,6 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD_TEST }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
5 changes: 5 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,8 @@
Version 3.19.2 released 2023-10-05

* Updated test & build matrix to include Python 3.12 and use
GitHub Actions as a Trusted Publisher (OIDC)

Version 3.19.1 released 2023-04-06

* This release contains security hardening measures based on recommendations
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -40,6 +40,7 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down

0 comments on commit cf1367b

Please sign in to comment.