genetic-algorithm-tsp 0.1.3

Using genetic algorithms to solve Traveling salesman problems.
Documentation
on:
  push:
    branches:
      - master
name: Release Crate.
permissions:
  contents: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Git Repository.
        uses: actions/checkout@v1
      - name: Get current Rust toolchain.
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Run tests.
        run: cargo test
      - name: Extract Version number.
        run: head -n 3 Cargo.toml  | tail -n 1 | cut -c 12- | rev | cut -c 2- | rev > version.txt
      - name: Read in Version number.
        id: version_number
        uses: juliangruber/read-file-action@v1
        with:
          path: ./version.txt
      - name: Remove version file.
        run: rm version.txt
      - name: Login to cargo.
        run: cargo login ${CRATES_IO_TOKEN}
        env:
          CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
      - name: Publish release to crates.io.
        run: cargo publish
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
        with:
          tag_name: ${{ steps.version_number.outputs.content }}
          release_name: release-${{steps.version_number.outputs.content}}
          body: "Released version: ${{steps.version_number.outputs.content}}."
          draft: false
          prerelease: false