Skip to content

CD

CD #22

Workflow file for this run

name: CD
on:
schedule:
- cron: "0 0 * * 3"
workflow_dispatch:
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
secrets: inherit
release:
name: Release
needs: [ci]
runs-on: ubuntu-22.04
permissions:
contents: write
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0
- name: Dry run
uses: commitizen-tools/commitizen-action@1f11eb222996406681d2bfa1eb3d997eca46557c # 0.21.0
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
dry_run: true
- name: Bump
id: cz
uses: commitizen-tools/commitizen-action@1f11eb222996406681d2bfa1eb3d997eca46557c # 0.21.0
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
- name: Release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
bodyFile: _changelog.md
skipIfReleaseExists: true
tag: ${{ steps.cz.outputs.version }}
- name: Setup Rye
uses: nikaro/actions/setup-rye@89504f15e51cfdb0ca91e07bad599eca5b861a7d # 1.3.22
- name: Build package
run: rye build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
skip-existing: true