Bump version from 0.15.0 to 0.15.0 #8
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 | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Just | |
| uses: taiki-e/install-action@just | |
| - name: Create Venv | |
| run: just dev | |
| - name: Build Wheels | |
| run: just dist | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: ./dist | |
| release-pypi: | |
| name: PyPI Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download Wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: ./dist | |
| - name: PyPI Release | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| release-gh: | |
| name: GitHub Release | |
| needs: | |
| - release-pypi # we shouldn't release if releasing to pypi failed. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: ./dist | |
| - name: Release - Create or convert from draft | |
| run: | | |
| if gh release list | grep Draft; then | |
| old_version="$(gh release list | grep Draft | head -1 | cut -f1)" | |
| new_version="${{ github.ref_name }}" | |
| body=$(gh release view "$old_version" --json body -q ".body" | sed "s/\.\.\.$old_version/...$new_version/g") | |
| echo "$body"; | |
| gh release delete "$old_version" | |
| gh release create "$new_version" --title "$new_version" --notes "$body"; | |
| echo Release "$new_version" was published from draft template.; | |
| else | |
| gh release create "$new_version" --title "$new_version"; | |
| echo Release "$new_version" was published.; | |
| fi | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Upload artifacts into release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/* | |
| changelog: | |
| name: Update changelog | |
| needs: | |
| - release-gh | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - uses: rhysd/changelog-from-release/action@v3 | |
| with: | |
| file: CHANGELOG.md | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_summary_template: 'update changelog for ${{ github.ref_name }}' |