Skip to content

Commit

Permalink
Fix release to PyPI after raw rst directive disabled
Browse files Browse the repository at this point in the history
As seen in https://github.com/astronomer/astronomer-cosmos/actions/runs/11485503895/job/31965756381

We started facing the following error while trying to publish packages to PyPI:

```
ERROR    `long_description` has syntax errors in markup and would not be
         rendered on PyPI.
         line 88: Warning: "raw" directive disabled.
Checking dist/astronomer_cosmos-1.7.1a1.tar.gz: FAILED
```

I was able to reproduce the Github action error by running:

```
rm -fr dist && python -m build --wheel && twine check dist/*
```

This PR aims to solve the issue, hopefully without side-effects on Scarf metrics.
  • Loading branch information
tatiana committed Oct 24, 2024
1 parent 772ab55 commit f082e65
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy to PyPi
on:
release:
types: [published]
branches: [fix-release]

jobs:
build:
Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
path: dist

- name: Push build artifacts to PyPi
uses: pypa/gh-action-pypi-publish@v1.8.14
uses: pypa/gh-action-pypi-publish@v1.10.3
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

1.7.1a1 (2024-10-24)
--------------------

Others

* Fix release to PyPI after rst directive disabled by @tatiana in #1281



1.7.0 (2024-10-04)
------------------

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ ______________
This project follows `Astronomer's Privacy Policy <https://www.astronomer.io/privacy/>`_

.. Tracking pixel for Scarf
.. raw:: html
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=ae43a92a-5a21-4c77-af8b-99c2242adf93" />
.. image:: https://static.scarf.sh/a.png?x-pxid=ae43a92a-5a21-4c77-af8b-99c2242adf93
:target: https://static.scarf.sh/a.png?x-pxid=ae43a92a-5a21-4c77-af8b-99c2242adf93
2 changes: 1 addition & 1 deletion cosmos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Contains dags, task groups, and operators.
"""

__version__ = "1.7.0"
__version__ = "1.7.0a1"


from cosmos.airflow.dag import DbtDag
Expand Down

0 comments on commit f082e65

Please sign in to comment.