Skip to content

Commit 980bac0

Browse files
authored
Update release.yml
1 parent 023e314 commit 980bac0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Release
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
branches:
6+
- 'main'
77

88
env:
99
CARGO_TERM_COLOR: always
@@ -88,19 +88,24 @@ jobs:
8888
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
8989
WORKDIR=$(pwd)
9090
PKG=osvm-$VERSION
91-
TARBALL="../osvm_${VERSION}.orig.tar.gz" # Create tarball in parent directory
91+
TARBALL="osvm_${VERSION}.orig.tar.gz" # Create tarball in current directory
9292
# Clean up any old stuff
9393
rm -rf "$PKG"
9494
rm -f "$TARBALL"
9595
# Prepare source dir
9696
mkdir -p "$PKG"
9797
cp -r src Cargo.toml Cargo.lock README.md LICENSE "$PKG/"
98-
# Pack source tarball in the parent dir
98+
# Pack source tarball in the current dir
9999
tar czvf "$TARBALL" "$PKG"
100+
# Ensure the tarball exists
101+
if [ ! -f "$TARBALL" ]; then
102+
echo "Error: $TARBALL not found!"
103+
exit 1
104+
fi
100105
# Move into the package dir
101106
cd "$PKG"
102107
# Run dh_make using relative path to the tarball
103-
dh_make -y -s -c apache -e [email protected] -f "../osvm_${VERSION}.orig.tar.gz"
108+
dh_make -y -s -c apache -e [email protected] -f "../$TARBALL"
104109
# Move back to the working dir
105110
cd "$WORKDIR"
106111
# Build the .deb package

0 commit comments

Comments
 (0)