@@ -313,11 +313,6 @@ jobs:
313313 </table>
314314 </div>
315315
316- <div class="card">
317- <h2>Coverage Report</h2>
318- <p><a href="../htmlcov/index.html">HTML Coverage Report</a></p>
319- </div>
320-
321316 <p class="timestamp">Generated: $(date -u "+%Y-%m-%d %H:%M:%S UTC")</p>
322317 </body>
323318 </html>
@@ -614,60 +609,61 @@ jobs:
614609 publish_dir : ./site
615610 keep_files : true
616611
617- # publish:
618- # needs: build
619- # runs-on: ubuntu-latest
620- # if: startsWith(github.ref, 'refs/tags/v')
621- # steps:
622- # - uses: actions/checkout@v3
623-
624- # - name: Set up Python
625- # uses: actions/setup-python@v4
626- # with:
627- # python-version: '3.10'
628-
629- # - name: Install dependencies
630- # run: |
631- # python -m pip install --upgrade pip
632- # pip install build twine
633-
634- # - name: Build package
635- # run: python -m build
636-
637- # - name: Publish to PyPI
638- # env:
639- # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
640- # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
641- # run: twine upload dist/*
642-
643- # create-release:
644- # needs: publish
645- # runs-on: ubuntu-latest
646- # if: startsWith(github.ref, 'refs/tags/v')
647- # steps:
648- # - uses: actions/checkout@v4
649- # with:
650- # fetch-depth: 0
651-
652- # - name: Generate release notes
653- # id: release_notes
654- # run: |
655- # VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
656- # echo "Generating release notes for $VERSION"
657-
658- # # Extract changelog entries for this version
659- # NOTES=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '1d;$d')
660-
661- # # Format for GitHub release
662- # echo "notes<<EOF" >> $GITHUB_OUTPUT
663- # echo "$NOTES" >> $GITHUB_OUTPUT
664- # echo "EOF" >> $GITHUB_OUTPUT
665-
666- # - name: Create GitHub Release
667- # uses: softprops/action-gh-release@v1
668- # with:
669- # files: |
670- # dist/*
671- # body: ${{ steps.release_notes.outputs.notes }}
672- # env:
673- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
612+ publish :
613+ needs : build
614+ runs-on : ubuntu-latest
615+ if : startsWith(github.ref, 'refs/tags/v')
616+ environment : pypi-publish
617+ permissions :
618+ id-token : write
619+ contents : read
620+ steps :
621+ - uses : actions/checkout@v4
622+
623+ - name : Set up Python
624+ uses : actions/setup-python@v4
625+ with :
626+ python-version : ' 3.10'
627+
628+ - name : Install dependencies
629+ run : |
630+ python -m pip install --upgrade pip
631+ pip install build
632+
633+ - name : Build package
634+ run : python -m build
635+
636+ - name : Publish to PyPI
637+ uses : pypa/gh-action-pypi-publish@release/v1
638+
639+ create-release :
640+ needs : publish
641+ runs-on : ubuntu-latest
642+ if : startsWith(github.ref, 'refs/tags/v')
643+ steps :
644+ - uses : actions/checkout@v4
645+ with :
646+ fetch-depth : 0
647+
648+ - name : Generate release notes
649+ id : release_notes
650+ run : |
651+ VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
652+ echo "Generating release notes for $VERSION"
653+
654+ # Extract changelog entries for this version
655+ NOTES=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '1d;$d')
656+
657+ # Format for GitHub release
658+ echo "notes<<EOF" >> $GITHUB_OUTPUT
659+ echo "$NOTES" >> $GITHUB_OUTPUT
660+ echo "EOF" >> $GITHUB_OUTPUT
661+
662+ - name : Create GitHub Release
663+ uses : softprops/action-gh-release@v1
664+ with :
665+ files : |
666+ dist/*
667+ body : ${{ steps.release_notes.outputs.notes }}
668+ env :
669+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments