fgm 0.2.2

Fast and simple go version manager
Documentation
name: release

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

env:
  CARGO_TERM_COLOR: always

jobs:
  release:
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            archive: tar.gz

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v3

      - uses: dtolnay/rust-toolchain@stable
        with:
          target: ${{ matrix.target }}

      - name: Cache Dependencies
        uses: Swatinem/rust-cache@v2

      - name: Build
        run: cargo build --release --locked --target ${{ matrix.target }}

      - name: Pack Artifacts
        env:
          RELEASE_NAME: fgm-${{ matrix.target }}
          ARTIFACTS_DIR: target/${{ matrix.target }}/release
        run: |
          mkdir $RELEASE_NAME
          cp $ARTIFACTS_DIR/fgm -t $RELEASE_NAME
          cp readme.md LICENSE -t $RELEASE_NAME
          tar -zcvf $RELEASE_NAME.${{ matrix.archive }} -C $RELEASE_NAME .

      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: fgm-${{ matrix.target }}.${{ matrix.archive }}