Skip to content

Commit

Permalink
CI: New release.yml, use gh CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
n0toose committed Jun 10, 2024
1 parent 5e6111f commit fb08467
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
merge_group:

Expand Down Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fb08467

Please sign in to comment.