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
21 changes: 21 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends:
- '@commitlint/config-conventional'

rules:
# Allow slightly longer subjects; we have descriptive messages.
header-max-length: [2, always, 100]
# Enforce lowercase type (feat, fix, ...) and allow common scopes.
type-enum:
- 2
- always
- - build
- chore
- ci
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
16 changes: 16 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Commitlint

on:
pull_request:
types: [opened, reopened, edited, synchronize]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
with:
configFile: .commitlintrc.yml
49 changes: 49 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches: [master]

jobs:
# Opens / updates the "release PR" that bumps versions and edits the CHANGELOG.
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'imperviousinc' }}
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# Tags + publishes to crates.io when a release commit lands on master.
release-plz-release:
name: Release-plz publish
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'imperviousinc' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "yuki"
name = "bitcoin_yuki"
version = "0.0.1"
authors = ["buffrr <contact@buffrr.dev>", "Rob <rustaceanrob@protonmail.com>"]
edition = "2024"
license = "MIT OR Apache-2.0"
description = "A light Bitcoin node"
repository = "https://github.com/buffrr/yuki"
repository = "https://github.com/imperviousinc/yuki"
readme = "README.md"
keywords = ["bitcoin", "cryptography", "network", "peer-to-peer"]
categories = ["cryptography::cryptocurrencies"]
Expand Down
54 changes: 54 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[workspace]
# Changelog lives at repo root alongside Cargo.toml.
changelog_path = "CHANGELOG.md"
# Always regenerate the changelog from conventional commits.
changelog_update = true
# Open a single release PR per push to master.
pr_draft = false

[changelog]
header = """# Changelog

Notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
"""

body = """
## [{{ version | trim_start_matches(pat=\"v\") }}]\
{%- if release_link -%}\
({{ release_link }})\
{% endif %} - {{ timestamp | date(format=\"%Y-%m-%d\") }}
{% for group, commits in commits | group_by(attribute=\"group\") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}
"""

commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^docs", group = "Documentation" },
{ message = "^test", group = "Tests" },
{ message = "^build", group = "Build" },
{ message = "^ci", group = "CI" },
{ message = "^chore\\(release\\)", skip = true },
{ message = "^chore", group = "Chore" },
{ message = "^revert", group = "Revert" },
]

[[package]]
name = "bitcoin_yuki"
# Publish to crates.io on release commits.
publish = true
# Create a GitHub release alongside the tag.
git_release_enable = true
# Use the commit subject as the GitHub release title.
git_tag_name = "v{{ version }}"
Loading