update workflow

This commit is contained in:
griffi-gh 2023-05-17 12:30:14 +02:00
parent c1f3fe3db0
commit ba95b1820c
5 changed files with 31 additions and 8 deletions

View file

@ -3,6 +3,8 @@ name: Build
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
@ -12,10 +14,15 @@ env:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
if: runner.os == 'Linux'
with:
packages: libudev-dev
version: 1.0
@ -26,6 +33,7 @@ jobs:
--bin kubi
--bin kubi-server
- name: Create artifact
shell: bash
run: |
mkdir artifact;
cp ./target/release/kubi ./artifact;
@ -34,6 +42,21 @@ jobs:
cp ./Server.toml ./artifact;
- uses: actions/upload-artifact@v3
with:
name: linux-x64-release
name: ${{ runner.temp }}_${{ runner.arch }}
path: ./artifact/*
if-no-files-found: error
publish-release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
path: ./artifacts
- uses: rlespinasse/github-slug-action@v4
- uses: ncipollo/release-action@v1
with:
tag: ${{ env.GITHUB_REF_SLUG_URL }}
makeLatest: true
artifacts: ./artifacts/*

6
Cargo.lock generated
View file

@ -936,7 +936,7 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]]
name = "kubi"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"anyhow",
"flume",
@ -969,7 +969,7 @@ dependencies = [
[[package]]
name = "kubi-server"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"anyhow",
"flume",
@ -991,7 +991,7 @@ dependencies = [
[[package]]
name = "kubi-shared"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"anyhow",
"bracket-noise",

View file

@ -1,6 +1,6 @@
[package]
name = "kubi-server"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
publish = false

View file

@ -1,6 +1,6 @@
[package]
name = "kubi-shared"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
publish = false

View file

@ -1,6 +1,6 @@
[package]
name = "kubi"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
publish = false