Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@semantic-release/exec",
{
"prepareCmd": "./scripts/createdistribution.sh",
"publishCmd": "./scripts/uploaddistribution_live.sh"
"publishCmd": "./scripts/uploaddistribution_test.sh && ./scripts/uploaddistribution_live.sh"
}
],
[
Expand Down
2 changes: 1 addition & 1 deletion scripts/uploaddistribution_live.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
twine upload --skip-existing -u "${TWINE_LIVE_USERNAME}" -p "${TWINE_LIVE_PASSWORD}" dist/*
twine upload --skip-existing -p "${TWINE_LIVE_TOKEN}" dist/*
8 changes: 5 additions & 3 deletions scripts/uploaddistribution_test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/bash

# This script uploads the distribution packages to the Test PyPI repository.
# It uses the environment variables TWINE_TEST_USERNAME and TWINE_TEST_PASSWORD for authentication.
# It uses the environment variables TWINE_TEST_USERNAME and TWINE_TEST_TOKEN for authentication.

# TWINE_TEST_USERNAME: The username for Test PyPI.
# TWINE_TEST_PASSWORD: The password for Test PyPI.
# TWINE_TEST_TOKEN: The password for Test PyPI.

# no user name is needed when using API tokens, so we can skip the username and just use the token for authentication.

# Increment the version number in your setup.py or pyproject.toml file before running this script.
# Example for setup.py: update the version parameter in the setup() function.
# Example for pyproject.toml: update the version field under [tool.poetry].

twine upload -u "${TWINE_TEST_USERNAME}" -p "${TWINE_TEST_PASSWORD}" --repository-url https://test.pypi.org/legacy/ dist/* --skip-existing
twine upload -p "${TWINE_TEST_TOKEN}" --repository-url https://test.pypi.org/legacy/ dist/* --skip-existing