diff --git a/.github/workflows/lint_fmt_test.yml b/.github/workflows/lint_fmt_test.yml new file mode 100644 index 0000000..5034226 --- /dev/null +++ b/.github/workflows/lint_fmt_test.yml @@ -0,0 +1,37 @@ +on: + pull_request: + push: + branches: + - main + + +name: Format, Lint and Test + +jobs: + check: + name: Cargo Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo check + + fmt: + name: Formatter Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo fmt --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo clippy --no-deps + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2d1aa49 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + tags: + - '*.*.*' + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + environment: Release + env: + RUSTFLAGS: "-Dwarnings" + steps: + - name: Build + run: cargo build --release --locked + - name: Upload + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.SPIDER_CRAB_TOKEN }} + file: target/release/spider-crab + asset_name: spider-crab-linux-amd64 + tag: ${{ github.ref }} + overwrite: false diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 5511b88..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - env: - RUSTFLAGS: "-Dwarnings" - steps: - - uses: actions/checkout@v3 - - name: Format Check - run: cargo fmt --check - - name: Linter Check - run: cargo clippy --no-deps - - name: Cargo Test - run: cargo test - - name: Build - run: cargo build --verbose