From 11554c6b4b03575e7149c78babf4db2e1435d9f2 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Wed, 17 May 2023 12:30:14 +0200 Subject: [PATCH] update workflow --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++-- Cargo.lock | 6 +++--- kubi-server/Cargo.toml | 2 +- kubi-shared/Cargo.toml | 2 +- kubi/Cargo.toml | 2 +- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9df424b..e32acc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/* diff --git a/Cargo.lock b/Cargo.lock index ab63596..635226b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/kubi-server/Cargo.toml b/kubi-server/Cargo.toml index def9455..3cc19b3 100644 --- a/kubi-server/Cargo.toml +++ b/kubi-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kubi-server" -version = "0.1.0" +version = "0.0.0" edition = "2021" publish = false diff --git a/kubi-shared/Cargo.toml b/kubi-shared/Cargo.toml index eea1180..7c1fb5e 100644 --- a/kubi-shared/Cargo.toml +++ b/kubi-shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kubi-shared" -version = "0.1.0" +version = "0.0.0" edition = "2021" publish = false diff --git a/kubi/Cargo.toml b/kubi/Cargo.toml index 4ab9574..9a9e6b8 100644 --- a/kubi/Cargo.toml +++ b/kubi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kubi" -version = "0.1.0" +version = "0.0.0" edition = "2021" publish = false