From fb084675154ec96b9bf501136fe43083c4e45e1f Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Mon, 10 Jun 2024 14:59:57 +0200 Subject: [PATCH] CI: New release.yml, use gh CLI --- .github/workflows/ci.yml | 3 --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4173f533..21f83cc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: push: branches: - main - tags: - - "v*.*.*" pull_request: merge_group: @@ -152,7 +150,6 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} release: - if: startsWith(github.ref, 'refs/tags/') name: Create new release runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..fa570500 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + release: + name: Create new release + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + flags: --target x86_64-unknown-linux-gnu + asset_name: "uhyve-${{ github.ref_name }}-linux-amd64" + path: "./target/release/uhyve" + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --release --locked ${{ matrix.flags }} + - run: gh release create ${{ github.ref }} --draft --title "Uhyve ${{ github.ref_name }}" + - run: gh release upload ${{ github.ref }} ${{ matrix.path }}#${{ matrix.asset_name }} --clobber \ No newline at end of file