Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Conventional Commits

on: [push]

jobs:
validate-commits:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install cocogitto
run: |
curl -L https://github.com/cocogitto/cocogitto/releases/latest/download/cocogitto-6.3.0-x86_64-unknown-linux-musl.tar.gz \
| tar --strip-components=1 -xz -C /usr/local/bin x86_64-unknown-linux-musl/cog

- name: Validate conventional commits
run: |
# Find merge base and check commits in PR only
MERGE_BASE=$(git merge-base origin/main HEAD)
cog check ${MERGE_BASE}..HEAD
3 changes: 2 additions & 1 deletion Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ set -eu
# Invoked via "cog bump -a"
publish() {
git push origin main --tags
rm -rf dist/
pip install --upgrade build twine
python3 -m build
twine upload dist/*
rm dist/*
rm -rf dist/
}

if ! command -v argc >/dev/null; then
Expand Down
1 change: 1 addition & 0 deletions cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cog verify --file "$1"
"""

[commit_types]
build = { changelog_title = "", omit_from_changelog = true }
chore = { changelog_title = "", omit_from_changelog = true }
docs = { changelog_title = "", omit_from_changelog = true }

Expand Down