dotz 1.0.3

A CLI tool to manage your dotfiles (unix only)
Documentation
on:
  push:
    tags:
      - '*'

name: Publish

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        toolchain:
          - stable
          - beta
          - nightly

    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

      - name: Build
        run: cargo build --verbose

      - name: Test
        run: cargo test --verbose

  publish:
    name: Publish
    needs: test
    environment: publish_crates
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        toolchain:
          - stable

    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

      - run: cargo publish --token ${CRATES_TOKEN}
        env:
          CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}