Projects STRLCPY deduplicator Commits 8acc3f8c
🤬
  • added github workflow for building binaries with releases

  • Loading...
  • sreedev committed 1 year ago
    8acc3f8c
    1 parent 38f6c484
  • ■ ■ ■ ■ ■ ■
    .github/workflows/build_and_release.yml
     1 +name: Build and release
     2 + 
     3 +on:
     4 + push:
     5 + branches:
     6 + - main
     7 + release:
     8 + types: [created]
     9 + 
     10 +jobs:
     11 + build:
     12 + runs-on: ubuntu-latest
     13 + steps:
     14 + - name: Checkout code
     15 + uses: actions/checkout@v2
     16 + 
     17 + - name: Setup Rust
     18 + uses: actions-rs/toolchain@v1
     19 + with:
     20 + toolchain: stable
     21 + profile: minimal
     22 + override: true
     23 + 
     24 + - name: Build for Windows
     25 + run: |
     26 + cargo build --release --target x86_64-pc-windows-gnu
     27 + 
     28 + - name: Build for Linux
     29 + run: |
     30 + cargo build --release --target x86_64-unknown-linux-gnu
     31 + 
     32 + - name: Build for MacOS
     33 + run: |
     34 + cargo build --release --target x86_64-apple-darwin
     35 + 
     36 + - name: Create release
     37 + uses: actions/create-release@v2
     38 + env:
     39 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     40 + with:
     41 + tag_name: ${{ github.ref }}
     42 + release_name: Release ${{ github.ref }}
     43 + draft: false
     44 + prerelease: false
     45 + 
  • ■ ■ ■ ■ ■ ■
    .github/workflows/rust.yml
    1  -name: Rust
    2  - 
    3  -on:
    4  - push:
    5  - branches: [ "main" ]
    6  - pull_request:
    7  - branches: [ "main" ]
    8  - 
    9  -env:
    10  - CARGO_TERM_COLOR: always
    11  - 
    12  -jobs:
    13  - build:
    14  - runs-on: ubuntu-latest
    15  - steps:
    16  - - uses: actions/checkout@v3
    17  - - name: Build
    18  - run: cargo build --verbose
    19  - - name: Run tests
    20  - run: cargo test --verbose
    21  - 
Please wait...
Page is in error, reload to recover