-
Notifications
You must be signed in to change notification settings - Fork 29
38 lines (33 loc) · 1.02 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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