beancount-parser-lima 0.16.3

A zero-copy parser for Beancount
Documentation
name: Cross-platform Release

on:
  push:
    tags:
      - "[0-9]*"

permissions:
  contents: write

env:
  CARGO_TERM_COLOR: always

jobs:
  publish-crate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Verify tag and Cargo version match
        run: |
          VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d'"' -f2)
          TAG=${GITHUB_REF_NAME#v}
          [ "$VERSION" = "$TAG" ]

      - name: Cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ubuntu-latest-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Run tests
        run: |
          cargo test --all-targets

      - name: Publish crate
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.BEANCOUNT_PARSER_LIMA_CRATE_DEPLOY_TOKEN }}
        run: |
          cargo publish