From 28b5dadeeadabc86acad60a6feeefd6b97fb6f2b Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Mon, 10 Jun 2024 15:32:09 +0200 Subject: [PATCH] CI: Try new packaging format --- .github/workflows/release.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 218d9db4..9b6590ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,24 @@ jobs: matrix: include: - os: ubuntu-latest - flags: --target x86_64-unknown-linux-gnu - asset_name: "uhyve-${{ github.ref_name }}-linux-amd64" - path: "target/release/uhyve" + filename_suffix: "${{ github.ref_name }}-linux-amd64" + uhyve_path: "target/release/uhyve" + uhyve-interface_path: "target/release/uhyve-interface" 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: ls - - run: ls target/release - - run: gh release upload ${{ github.ref }} ${{ matrix.path }}#${{ matrix.asset_name }} --clobber \ No newline at end of file + # Adapted from: https://github.com/mkroening/edu-sync/blob/main/.github/workflows/release.yml + - name: Create archive + run: | + DIST=uhyve-${{ matrix.filename_suffix }} + mkdir $DIST + + mv target/release/uhyve $DIST + cp README.md $DIST + cp LICENSE-* $DIST + + tar czf $DIST.tar.gz $DIST + echo "FILE=$DIST.zip" >> $GITHUB_ENV + - run: gh release upload ${{ github.ref }} $FILE --clobber \ No newline at end of file