Skip to content

Commit a6d77ad

Browse files
Publish to azure artifacts and public pypi simultaneously (#579)
1 parent f515847 commit a6d77ad

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,31 @@ jobs:
3232
uses: pypa/gh-action-pypi-publish@release/v1
3333
with:
3434
password: ${{ secrets.PYPI_API_TOKEN }}
35+
skip-existing: true
36+
37+
- name: Create .pypirc for Azure Artifacts
38+
run: |
39+
cat <<EOF > ~/.pypirc
40+
[distutils]
41+
index-servers =
42+
azure
43+
44+
[azure]
45+
repository: https://pkgs.dev.azure.com/${{ secrets.AZURE_ORG }}/${{ secrets.AZURE_PROJECT }}/_packaging/${{ secrets.AZURE_FEED }}/pypi/upload/
46+
username: ${{ secrets.AZURE_USERNAME }}
47+
password: ${{ secrets.AZURE_ARTIFACTS_PAT }}
48+
EOF
49+
50+
- name: Publish package to Azure Artifacts
51+
run: |
52+
if twine upload -r azure dist/* --skip-existing; then
53+
echo "✅ Successfully published to Azure Artifacts (or already existed)"
54+
else
55+
EXIT_CODE=$?
56+
echo "❌ Azure Artifacts upload failed, but PyPI upload succeeded"
57+
if [[ $EXIT_CODE == 1 ]]; then
58+
echo "⚠️ This may be due to version conflicts or connectivity issues"
59+
fi
60+
echo "This is non-critical - the package is available on PyPI"
61+
exit 0
62+
fi

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.6
2+
3+
**Publish to both pypi and artifacts**
4+
15
## 1.2.5
26

37
**Fix**: move S3 ambient_credentials out of AccessConfig

unstructured_ingest/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.5" # pragma: no cover
1+
__version__ = "1.2.6" # pragma: no cover

0 commit comments

Comments
 (0)