Skip to content

Commit f7759a3

Browse files
Copilotdobairoland
andcommitted
Remove manual version checking, let PyPA action handle duplicate detection
Co-authored-by: dobairoland <[email protected]>
1 parent ea35ab6 commit f7759a3

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

.github/workflows/dev_release_esptool_pypi.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ jobs:
3232
run: |
3333
python ci/patch_dev_release.py --version ${{ github.ref_name }} esptool/__init__.py
3434
git diff
35-
python -m pip download esptool==$(python setup.py -V) && echo "Version ${{ github.ref_name }} already published, skipping..." && exit 1
36-
37-
echo "Packaging and publishing new esptool development release: ${{ github.ref_name }}"
35+
echo "Packaging esptool development release: ${{ github.ref_name }}"
3836
python -m build --sdist
3937
- name: Publish package to PyPI
40-
if: success()
4138
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release_esptool_pypi.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,9 @@ jobs:
2424
run: |
2525
python -m pip install --upgrade pip
2626
pip install build
27-
- name: Build and upload esptool ${{ github.event.release.tag_name }}
27+
- name: Build esptool ${{ github.event.release.tag_name }}
2828
run: |
29-
PUBLISHED_VERSION=$(curl https://pypi.org/pypi/esptool/json 2>/dev/null | jq -r '.info.version')
30-
CURRENT_VERSION=$(python setup.py --version 2>/dev/null)
31-
32-
if [ "$PUBLISHED_VERSION" == "$CURRENT_VERSION" ]; then
33-
echo "Version ${PUBLISHED_VERSION} already published, skipping..."
34-
exit 1
35-
else
36-
echo "Packaging and publishing new esptool version: ${CURRENT_VERSION}"
37-
python -m build --sdist
38-
fi
29+
echo "Packaging esptool version: $(python setup.py --version 2>/dev/null)"
30+
python -m build --sdist
3931
- name: Publish package to PyPI
40-
if: success()
4132
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)