Skip to content

Commit

Permalink
Allow re-running release action.
Browse files Browse the repository at this point in the history
  • Loading branch information
robamler committed Aug 31, 2024
1 parent df3f675 commit c1b1ea5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,13 @@ jobs:
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable

# We don't return an error here if `cargo publish` fails for the same reason why
# we use `--skip-existing` in `twine upload` below.
- name: Publish on crates.io
if: github.event_name == 'release'
run: |
cargo login ${{ secrets.CARGO }}
cargo publish
cargo publish || echo "Publishing failed."
python-publish:
needs: testall
Expand Down Expand Up @@ -391,13 +393,15 @@ jobs:
python -m pip install poetry
poetry install --no-root
- name: Publish wheels (unix)
# We use `--skip-existing` here so that we can run The release script again
# (possibly after fixing maturin issues) if it failed on just some files.
- name: Publish wheels
if: github.event_name == 'release'
shell: bash
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}
run: poetry run twine upload target/wheels/*.whl
run: poetry run twine upload --skip-existing target/wheels/*.whl

- name: Add wheels to Github release
if: github.event_name == 'release'
Expand Down

0 comments on commit c1b1ea5

Please sign in to comment.