licc 0.2.0

Liefland Idle Champions Codes - Client for the liefland codes API service for Idle Champions of the Forgotten Realms chest codes
Documentation
name: Rust

on:
  push:
    branches: [ "main" ]
    tags: [ "release/v*" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build
      - name: Run tests
        run: cargo test

  test_write:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --features="write"
      - name: Run tests
        run: cargo test --features="write"
      - name: Lint
        uses: giraffate/clippy-action@v1
      - name: Cargo check
        run: cargo check

  examples:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --examples

  publish:
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release/v')
    needs: [test, test_write]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Authenticate
        run: cargo login ${{ secrets.CARGO_PUBLISH_TOKEN }}
      - name: Publish
        run: cargo publish