Skip to content

CD

CD #35

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-latest
permissions:
contents: write
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Dry run
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
dry_run: true
- name: Bump
if: env.PREVIOUS_REVISION != env.REVISION
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
- name: Release
if: env.PREVIOUS_REVISION != env.REVISION
uses: ncipollo/release-action@v1
with:
bodyFile: _changelog.md
skipIfReleaseExists: true
tag: ${{ env.REVISION }}
- name: Install tools
run: |
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH"
/home/linuxbrew/.linuxbrew/bin/brew install \
go-task \
rye \
- name: Build package
if: env.PREVIOUS_REVISION != env.REVISION
run: task build --yes
- name: Publish package to PyPI
if: env.PREVIOUS_REVISION != env.REVISION
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true