Skip to content

fix: replace images with unknown authors (#71) #70

fix: replace images with unknown authors (#71)

fix: replace images with unknown authors (#71) #70

on:
push:
branches:
- master
name: release-please
jobs:
list_modules:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(find . -type f -name 'Dockerfile' | awk -F\/ '{print $3"/"$4}' | jq -Rsc '. / "\n" - [""]')"
release-please:
name: release-${{ matrix.subject }}
runs-on: ubuntu-latest
needs: list_modules
strategy:
matrix:
subject: ${{fromJSON(needs.list_modules.outputs.matrix)}}
steps:
- name: Set environment
run: |
echo "PACKAGE_NAME=$( echo "${{ matrix.subject }}" | awk -F\/ '{print "thumbor-plugins-"$2}' )" >> $GITHUB_ENV
- uses: google-github-actions/release-please-action@v3
id: release
with:
monorepo-tags: true
release-type: python
path: thumbor_plugins/${{ matrix.subject }}
package-name: ${{ env.PACKAGE_NAME }}
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-python@v2
if: ${{ steps.release.outputs.releases_created }}
with:
python-version: '3.x'
- name: Build package
if: ${{ steps.release.outputs.releases_created }}
working-directory: ./thumbor_plugins/${{ matrix.subject }}
run: |
pip install -U pip
pip install -U build
python -m build
- name: Publish a Python distribution to PyPI
if: ${{ steps.release.outputs.releases_created }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: thumbor_plugins/${{ matrix.subject }}/dist
skip_existing: true