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
6 changes: 3 additions & 3 deletions .github/workflows/publish-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish Go bindings
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Setup Go module
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand All @@ -116,7 +116,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GO_PUBLISH_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME}"
VERSION="v${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="v0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-kotlin-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish Kotlin Android
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Set version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-kotlin-jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish Kotlin JVM
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:

- name: Set version
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish npm (WASM)
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Set package version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish PyPI (Python)
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand All @@ -18,7 +18,7 @@ jobs:
steps:
- id: ver
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish React Native (npm)
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set version from tag
working-directory: bindings/react-native
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish Swift (XCFramework)
on:
push:
tags:
- "v*"
- "libveritas-v*"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
echo "checksum=$CHECKSUM" >> "$GITHUB_OUTPUT"
echo "XCFramework checksum: $CHECKSUM"

VERSION="${GITHUB_REF_NAME}"
VERSION="v${GITHUB_REF_NAME#libveritas-v}"
if [[ ! "$GITHUB_REF" == refs/tags/* ]]; then
VERSION="v0.0.0-dev.$(date +%Y%m%d%H%M%S)"
fi
Expand Down
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: [main]

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 == 'spacesprotocol' }}
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 main.
release-plz-release:
name: Release-plz publish
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'spacesprotocol' }}
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 }}
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@ jobs:
- name: Run tests
run: cargo test -p libveritas

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --exclude libveritas_methods --all-targets --all-features -- -D warnings

docs:
name: Docs
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --no-deps --all-features -p libveritas -p libveritas_zk

verify-elfs:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

All 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).
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to libveritas

Everyone is welcome to contribute towards development in the form of peer review, testing, and patches. This document explains the practical process and guidelines.

## Getting started

Reviewing and testing is highly valued and the most effective way to contribute as a new contributor. It also teaches you much more about the code and process than opening pull requests.

### Good First Issue Label

The purpose of the good-first-issue label is to highlight issues suitable for new contributors without a deep understanding of the codebase.

You do not need to request permission to start working on an issue. However, it's helpful to leave a comment if you are planning to work on one — it helps other contributors track which issues are actively being addressed and is also a good way to request assistance.

## Communication channels

You can join the [Spaces telegram](https://t.me/spacesprotocol).

Discussion about codebase improvements happens in GitHub issues and pull requests.

## Contributor workflow

The codebase is maintained using the "contributor workflow" where everyone contributes patch proposals using pull requests.

To contribute a patch:

1. Fork the repository (only the first time)
2. Create a topic branch
3. Commit patches using [conventional commits](https://www.conventionalcommits.org/) — this is enforced by CI and drives the changelog and release versioning. Examples: `feat: add lookup helper`, `fix(builder): handle empty record sets`, `docs: clarify SIG record semantics`.

## Squashing commits

If your pull request contains fixup commits or too fine-grained commits, squash them before review. See [how to write good commit messages](https://cbea.ms/git-commit/).

## Pull request philosophy

Keep patchsets focused: a PR should add a feature, fix a bug, or refactor code — not a mixture. Avoid super pull requests that try to do too much.

## Releases

Releases are automated via [release-plz](https://release-plz.dev/). When commits land on `main`, a release PR is opened automatically with version bumps and changelog entries derived from your conventional commits. Merging that PR tags the release and publishes to crates.io.

## Copyright

By contributing to this repository, you agree to license your work under the Apache-2.0 license. Any work contributed where you are not the original author must contain its license header with the original author(s) and source.
21 changes: 13 additions & 8 deletions Cargo.lock

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

Loading
Loading