rinex-cli 0.12.1

RINEX and SP3 data post processing tool
name: CI

on:
  push:
    branches: [ "main" ]
    tags:
      - "*"
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Build
      run: cargo build
    - name: Build (all features)
      run: cargo build --all-features
    - name: Coding style
      run: cargo fmt --all -- --check
  
  release:
    name: Release
    runs-on: ubuntu-latest
    needs: [build]
    if: github.ref_type == 'tag'
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
      - name: Publish
        env:
          TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
        run: |
          cargo login $TOKEN
          cargo publish