Skip to content

chore(pulumi): auto-applied workflow #11

chore(pulumi): auto-applied workflow

chore(pulumi): auto-applied workflow #11

Workflow file for this run

# THIS FILE IS GENERATED! DO NOT EDIT! Maintained by Pulumi
name: python release
on:
push:
tags:
- '*'
permissions:
contents: write
id-token: write
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
id: git-cliff
uses: orhun/git-cliff-action@v4
with:
config: .github/cliff.toml
args: -vv --current
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
create_draft_release:
name: Create release as draft
runs-on: ubuntu-latest
needs: [changelog]
steps:
- name: Create release as draft
run: gh release create ${{ github.ref_name }} -F ${{ needs.changelog.outputs.release_body }} --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --all-extras
- name: Publish package
run: |
sed -i -e "s/0.0.0/${GITHUB_REF#refs/*/}/" pyproject.toml
uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish_release:
name: Publish release
runs-on: ubuntu-latest
needs: [create_draft_release, changelog, package]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release
run: gh release edit ${{ github.ref_name }} --draft=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}