Skip to content

Update ament_black fork #2

Update ament_black fork

Update ament_black fork #2

Workflow file for this run

name: Publish to PyPI.org
on:
push:
branches:
- main
- master
# Publish to pypi only on tag events. To be replaced by "release" if more people use it
tags:
- v*
pull_request:
workflow_dispatch:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build sdist
run: |
pipx run build --sdist ${{github.workspace}}/ament_black/
mkdir -p dist && mv ${{github.workspace}}/ament_black/dist/*.tar.gz dist/
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
build_wheel:
name: Build wheels on ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build wheel
run: pipx run build --wheel ${{github.workspace}}/ament_black/
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
pypi:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [build_wheel, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}