grup 0.2.3

an offline github markdown previewer
name: Build and upload binaries to github
# based on this blogpost by mateus costa https://mateuscosta.me/rust-releases-with-github-actions
# and https://github.com/svenstaro/upload-release-action documentation

# trigger on any new tag
on:
  workflow_dispatch:
  schedule:
  # run every month on the first day at 01:00
    - cron: '0 1 1 * *'
  push:
    tags:
    - "*"

jobs:
  release:
    name: Build and Release
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            artifact_name: grup
            asset_name: grup-linux-amd64
          - os: macos-latest
            artifact_name: grup
            asset_name: grup-macos-amd64
          - os: windows-latest
            artifact_name: grup.exe
            asset_name: grup-windows-amd64.exe
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Build project
        run: cargo build --release
      - name: Upload binary to release
        uses: svenstaro/upload-release-action@v2
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          file: target/release/${{ matrix.artifact_name }}
          asset_name: ${{ matrix.asset_name }}
          tag: ${{ github.ref }}
          overwrite: true