secure 0.3.0

Solution that encrypt or compress rust consts in compile-time
Documentation
name: publish

on:
  #  push:
  #    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

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

    strategy:
      matrix:
        os:
          - ubuntu-latest
        toolchain:
          - stable

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Rust ${{ matrix.toolchain }}
        run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

      - name: Run Test
        run: cargo test --verbose --features compression,encryption

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

    strategy:
      matrix:
        os:
          - ubuntu-latest
        toolchain:
          - stable

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Rust ${{ matrix.toolchain }}
        run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

      - name: Run Build
        run: cargo build --verbose --features compression,encryption

  publish:
    runs-on: ubuntu-latest

    needs: [test, build]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Rust ${{ matrix.toolchain }}
        run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

      - name: Publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
        run: cargo publish --token $CARGO_REGISTRY_TOKEN