-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Publish binaries using GitHub Actions on new tag
Because of time constraints and because the workflow itself may need some additional work to support multiple operating systems without making individual releases for every target architecture and operating system, builds are only generated for Linux (amd64). New releases are marked as "Drafts" by default, so as to allow maintainers to edit the text before publication. Fixes #256
- Loading branch information
Showing
2 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
jobs: | ||
release: | ||
name: Create new release | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
filename_suffix: "${{ github.ref_name }}-linux-amd64" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Adapted from: https://github.com/mkroening/edu-sync/blob/main/.github/workflows/release.yml | ||
- run: gh release create ${{ github.ref }} --draft --title "Uhyve ${{ github.ref_name }}" | ||
if: startsWith(matrix.os, 'ubuntu') | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo build --release --locked | ||
- 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.tar.gz" >> $GITHUB_ENV | ||
- run: gh release upload ${{ github.ref }} $FILE |