Version 1.5.0 #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release new version | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/tinycss2 | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| - name: Install requirements | |
| run: python -m pip install flit | |
| - name: Build packages | |
| run: flit build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| add-version: | |
| name: Add version to GitHub | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install requirements | |
| run: sudo apt-get install pandoc | |
| - name: Generate content | |
| run: | | |
| pandoc docs/changelog.rst -f rst -t gfm | csplit - /##/ "{1}" -f .part | |
| sed -r "s/^([A-Z].*)\:\$/## \1/" .part01 | sed -r "s/^ *//" | sed -rz "s/([^\n])\n([^\n^-])/\1 \2/g" | tail -n +5 > .body | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: .body |