Skip to content

Commit

Permalink
feat(ci): Add automatic upload of release binary (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengia authored Dec 27, 2023
2 parents 3e8ca6d + 533c66d commit a51f000
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 27 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/lint_fmt_test.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 0 additions & 27 deletions .github/workflows/rust.yml

This file was deleted.

0 comments on commit a51f000

Please sign in to comment.