This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
ci: add a --skip-existing flag for twine #4
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: Release Package | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Build | |
run: docker build . --no-cache -t atternio | |
- name: Upload | |
run: | | |
python3 -m pip install twine | |
docker run --rm -i atternio /bin/sh -c "python3 -m poetry build && python3 -m twine upload -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PWD }} -r pypi --repository-url https://upload.pypi.org/legacy/ dist/* --skip-existing" |