Repository navigation
73 lines (70 loc) · 2.2 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (70 loc) · 2.2 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
linux-amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Normalize version
run: |
version="${GITHUB_REF_NAME#v}"
case "$version" in
""|v*) echo "invalid release tag: $GITHUB_REF_NAME" >&2; exit 1 ;;
esac
echo "VESSEL_VERSION=$version" >> "$GITHUB_ENV"
echo "version=$version" >> "$GITHUB_OUTPUT"
id: version
- name: Install native build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
build-essential \
libapparmor-dev \
libcap-dev \
libfuse3-dev \
libseccomp-dev \
libselinux1-dev \
libsystemd-dev \
libtool \
libyajl-dev \
libzstd-dev \
pkg-config \
zlib1g-dev
- run: cargo xtask print-version
- run: cargo xtask package-release
- name: Create release archive
run: |
version="${{ steps.version.outputs.version }}"
target="x86_64-unknown-linux-gnu"
dist="target/vessel-release/$target"
archive="vessel-$version-$target.tar.gz"
staging="target/release-archive/vessel-$version-$target"
rm -rf "target/release-archive"
mkdir -p "$(dirname "$staging")"
cp -a "$dist" "$staging"
tar -C "target/release-archive" -czf "$archive" "vessel-$version-$target"
sha256sum "$archive" > "$archive.sha256"
echo "archive=$archive" >> "$GITHUB_OUTPUT"
id: archive
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
name: vessel ${{ steps.version.outputs.version }}
generate_release_notes: true
files: |
${{ steps.archive.outputs.archive }}
${{ steps.archive.outputs.archive }}.sha256