Skip to content

Logging w/ new version #37

Logging w/ new version

Logging w/ new version #37

Workflow file for this run

name: Release
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release/syncbox
- os: macos-latest
target: aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/syncbox
- os: windows-latest
target: x86_64-pc-windows-gnu
path: target\x86_64-pc-windows-gnu\release\syncbox.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Run tests
run: cargo test --target ${{ matrix.target }}
- name: Build release
run: cargo build --release --target ${{ matrix.target }}
- name: Checksum
if : ${{ matrix.os != 'windows-latest' }}
run: shasum -a 256 ${{ matrix.path }}
- name: Archive binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: |
${{ matrix.path }}
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get artifacts
uses: actions/download-artifact@v4
- run: ls -la
- name: Zip artifacts
run: |
zip -j x86_64-unknown-linux-gnu.zip x86_64-unknown-linux-gnu/syncbox
zip -j aarch64-apple-darwin.zip aarch64-apple-darwin/syncbox
zip -j x86_64-pc-windows-gnu.zip x86_64-pc-windows-gnu/syncbox.exe
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
x86_64-unknown-linux-gnu.zip
aarch64-apple-darwin.zip
x86_64-pc-windows-gnu.zip