mirror of
https://github.com/pldubouilh/blockfast.git
synced 2026-08-27 20:36:34 -04:00
build & release on gh
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run tests
|
||||
run: make ci
|
||||
|
||||
- name: Build all artifacts
|
||||
run: make build-all
|
||||
|
||||
- name: "Release gh release versioned"
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts: "builds/*"
|
||||
bodyFile: "builds/buildout"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Release gh release latest"
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: latest
|
||||
name: Latest
|
||||
allowUpdates: true
|
||||
artifacts: "builds/*"
|
||||
bodyFile: "builds/buildout"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,19 +1,12 @@
|
||||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
name: always
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run CI
|
||||
@@ -1 +1,2 @@
|
||||
/target
|
||||
builds/**
|
||||
|
||||
@@ -14,6 +14,13 @@ ci:: test
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy -- -D warnings
|
||||
|
||||
build-all::
|
||||
cargo build --target x86_64-unknown-linux-musl --release
|
||||
mkdir -p builds
|
||||
cp target/x86_64-unknown-linux-musl/release/blockfast builds
|
||||
rustc --version > builds/buildout
|
||||
sha256sum builds/blockfast >> builds/buildout
|
||||
|
||||
publish:: ci
|
||||
cargo publish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user