Skip to content

Commit

Permalink
Use my composite actions
Browse files Browse the repository at this point in the history
To avoid code duplication and make management easier.
  • Loading branch information
pgjones committed Jan 9, 2025
1 parent 74a882a commit 5b8fe45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
tox:
name: ${{ matrix.name }}
runs-on: ubuntu-latest

container: python:${{ matrix.python }}

strategy:
fail-fast: false
matrix:
Expand All @@ -25,18 +28,13 @@ jobs:
- {name: 'package', python: '3.13', tox: package}

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: pgjones/actions/tox@v1
with:
python-version: ${{ matrix.python }}
environment: ${{ matrix.tox }}

- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
zizmor:
name: Zizmor
runs-on: ubuntu-latest

- run: tox -e ${{ matrix.tox }}
steps:
- uses: pgjones/actions/zizmor@v1
17 changes: 3 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: 3.13

- run: |
pip install pdm
pdm build
- uses: actions/upload-artifact@v3
with:
path: ./dist
- uses: pgjones/actions/build@v1

pypi-publish:
needs: ['build']
Expand All @@ -30,9 +19,9 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/
packages-dir: artifact/

0 comments on commit 5b8fe45

Please # to comment.