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
51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docs

on:
push:
branches: [master]

permissions:
contents: read
pages: write
id-token: write

# Only one deployment runs at a time; in-progress runs are not cancelled
# so a deploy already underway can finish cleanly.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for git-revision-date if added later

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install MkDocs Material
run: pip install mkdocs-material

- uses: actions/configure-pages@v4

- name: Build docs
run: mkdocs build --strict

- uses: actions/upload-pages-artifact@v3
with:
path: site/

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
33 changes: 32 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,37 @@ jobs:
needs: [linux, macos-x86_64, macos-arm64, windows, sdist]
environment: pypi # configure trusted publishing in this environment on PyPI
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # git-cliff needs full history to build the changelog
token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate changelog for this release (release body)
uses: orhun/git-cliff-action@v3
id: cliff_body
with:
config: cliff.toml
args: --current --strip all
env:
OUTPUT: body.md

- name: Regenerate full CHANGELOG.md
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --output CHANGELOG.md
env:
OUTPUT: CHANGELOG.md

- name: Commit updated CHANGELOG.md
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git diff --staged --quiet \
|| git commit -m "chore: update CHANGELOG for ${{ github.ref_name }}"
git push origin HEAD:master

- uses: actions/download-artifact@v4
with:
pattern: wheels-*
Expand All @@ -134,4 +165,4 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
body_path: body.md
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --
language: system
types: [rust]
pass_filenames: true

- id: cargo-clippy
name: cargo clippy
entry: cargo clippy -- -D warnings
language: system
types: [rust]
pass_filenames: false
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to pascal are documented here.

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec.

## [Unreleased]

_No unreleased changes yet._
55 changes: 55 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ petgraph = "0.6"
git2 = { version = "0.19", default-features = false, features = ["vendored-openssl"] }
indexmap = { version = "2", features = ["serde"] }
thiserror = "1"

[dev-dependencies]
tempfile = "3"
Loading