Skip to content

CD

CD #69

Workflow file for this run

name: CD
on:
schedule:
- cron: "0 0 * * 3"
workflow_dispatch:
env:
TASK_X_REMOTE_TASKFILES: 1
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
secrets: inherit
release:
name: Release
needs: [ci]
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
id: ${{ steps.release.outputs.id }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump
uses: commitizen-tools/[email protected]
with:
changelog_increment_filename: _changelog.md
github_token: ${{ github.token }}
no_raise: 3,21
- name: Download artifacts
if: env.PREVIOUS_REVISION != env.REVISION
uses: actions/download-artifact@v4
with:
name: sopsy-dist
path: ./dist/
- name: Release
id: release
if: env.PREVIOUS_REVISION != env.REVISION
uses: softprops/action-gh-release@v2
with:
body_path: _changelog.md
files: ./dist/*
tag_name: ${{ env.REVISION }}
publish:
name: Publish
needs: [release]
if: needs.release.outputs.id != ''
runs-on: ubuntu-latest
permissions:
id-token: write
environment: release
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: sopsy-dist
path: ./dist/
- name: Publish package to PyPI
if: env.PREVIOUS_REVISION != env.REVISION
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true