tildagon 0.0.6

Board support crate for the Electromagnetic Field Tildagon badge
name: Release-plz

permissions:
  pull-requests: write
  contents: write

on:
  push:
    branches:
      - main

jobs:
  # Release unpublished packages.
  release-plz-release:
    name: Release-plz release
    runs-on: ubuntu-latest
    if: ${{ github.repository_owner == 'DanNixon' }}

    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - uses: DeterminateSystems/nix-installer-action@v22

      - name: Install toolchain
        run: nix develop --command espup install

      - name: Run release-plz
        run: |
          source "$HOME/export-esp.sh"
          nix develop --command release-plz release --forge=github
        env:
          GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

  # Create a PR with the new versions and changelog, preparing the next release.
  release-plz-pr:
    name: Release-plz PR
    runs-on: ubuntu-latest
    if: ${{ github.repository_owner == 'DanNixon' }}

    permissions:
      contents: write
      pull-requests: write

    concurrency:
      group: release-plz-${{ github.ref }}
      cancel-in-progress: false

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - uses: DeterminateSystems/nix-installer-action@v22

      - name: Install toolchain
        run: nix develop --command espup install

      - name: Run release-plz
        run: |
          source "$HOME/export-esp.sh"
          nix develop --command release-plz release-pr --forge=github
        env:
          GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}