continue ci on error, eg if pip already exists for one of the packages #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
publish: | |
name: Publish ${{ matrix.package }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [docker-run-cli, docker-run-docker-ros] | |
continue-on-error: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install pypa/build | |
run: python3 -m pip install --user build | |
- name: Build wheel and tarball | |
run: python3 -m build --sdist --wheel --outdir dist/ ${{ matrix.package }} | |
# TestPyPI currently disabled cause `skip-existing: true` is not honored | |
# https://github.com/pypa/gh-action-pypi-publish/issues/201 | |
# - name: Publish to TestPyPI | |
# uses: pypa/gh-action-pypi-publish@v1.8.6 | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository-url: https://test.pypi.org/legacy/ | |
# skip-existing: true | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@v1.8.6 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip-existing: true |