Skip to content

feat: release sopsy

feat: release sopsy #5

Workflow file for this run

name: CD
on:
push:
branches: [main]
paths-ignore:
- .github/**
- .cz.toml
- .gitignore
- .pre-commit-config.yaml
- .yamllint.yml
- CHANGELOG.md
workflow_dispatch:
env:
# renovate: datasource=pypi depName=commitizen
COMMITIZEN_VERSION: 3.12.0
# renovate: datasource=github-releases depName=mitsuhiko/rye
RYE_VERSION: 0.15.2
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
secrets: inherit
release:
name: Release
needs: [ci]
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-22.04
permissions:
contents: write
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Dry run
uses: commitizen-tools/commitizen-action@bc2616fec6b3effc9ad20380f19550a8b18cdbdf # 0.20.0
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
commitizen_version: ${{ env.COMMITIZEN_VERSION }}
dry_run: true
- name: Bump
uses: commitizen-tools/commitizen-action@bc2616fec6b3effc9ad20380f19550a8b18cdbdf # 0.20.0
with:
github_token: ${{ github.token }}
changelog_increment_filename: _changelog.md
commitizen_version: ${{ env.COMMITIZEN_VERSION }}
- name: Release
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
with:
bodyFile: _changelog.md
skipIfReleaseExists: true
tag: ${{ env.REVISION }}
- name: Cache Rye installation
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.rye
key: ${{ runner.os }}-rye-${{ env.RYE_VERSION }}
- name: Install Rye
run: curl -sSf https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash
- name: Append Rye to PATH
run: echo "$HOME/.rye/shims" >> "$GITHUB_PATH"
- name: Build package
run: rye build --clean
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
with:
skip-existing: true