chezmoi_modify_manager 2.0.2

Chezmoi addon to patch ini files with mixed settings and state (experimental rust branch)
Documentation
name: Release

permissions:
  contents: write

on:
  push:
    tags:
      - v[0-9]+.*

jobs:
  create-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: taiki-e/create-gh-release-action@v1
        with:
          draft: true
          # (Required) GitHub token for creating GitHub Releases.
          token: ${{ secrets.GITHUB_TOKEN }}

  upload-assets:
    needs: create-release
    strategy:
      matrix:
        include:
          - target: aarch64-unknown-linux-gnu
            os: ubuntu-latest
          - target: armv7-unknown-linux-gnueabihf
            os: ubuntu-latest
          - target: i686-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-pc-windows-msvc
            os: windows-latest
          - target: x86_64-apple-darwin
            os: macos-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3
      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
          # Note that glob pattern is not supported yet.
          bin: chezmoi_modify_manager
          # (optional) Target triple, default is host triple.
          target: ${{ matrix.target }}
          # Include version number.
          archive: $bin-$tag-$target
          # (required) GitHub token for uploading assets to GitHub Releases.
          token: ${{ secrets.GITHUB_TOKEN }}

  upload-crates-io:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: cargo publish --token ${CRATES_TOKEN}
        env:
          CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

  upload-aur:
    needs:
      - create-release
      - upload-crates-io
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Generate updated PKGBUILD
        run:
          git clone https://aur.archlinux.org/chezmoi_modify_manager.git aur
          cd aur
          sed -i '/^_pkgver/s/=.*$/='"${RELEASE_TAG#v}"'/' PKGBUILD
          sed -i '/^pkgrel/s/=.*$/=1/' PKGBUILD
        env:
          RELEASE_TAG: ${{ github.ref }}
      - name: Publish AUR package
        uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
        with:
          pkgname: chezmoi_modify_manager
          pkgbuild: aur/PKGBUILD
          updpkgsums: true
          commit_username: ${{ secrets.AUR_USERNAME }}
          commit_email: ${{ secrets.AUR_EMAIL }}
          ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
          commit_message: New upstream release (automatic update from GitHub Actions)