Skip to content

Commit 891c1bd

Browse files
authored
Update release.yml
1 parent 4fa955c commit 891c1bd

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,19 @@ jobs:
8585
- name: Create Debian package
8686
run: |
8787
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
88-
# Prepare the source directory with source files, not the binary
89-
mkdir -p osvm-$VERSION
90-
cp -r src Cargo.toml Cargo.lock README.md LICENSE osvm-$VERSION/
91-
rm -f ../osvm_$VERSION.orig.tar.gz # <--- add this line
92-
tar czvf osvm_$VERSION.orig.tar.gz osvm-$VERSION
93-
cd osvm-$VERSION
94-
dh_make -y -s -c apache -e [email protected] -f ../osvm_$VERSION.orig.tar.gz
95-
cd ..
88+
WORKDIR=$(pwd)
89+
PKG=osvm-$VERSION
90+
TARBALL="$WORKDIR/osvm_${VERSION}.orig.tar.gz"
91+
rm -rf "$PKG"
92+
rm -f "$TARBALL"
93+
mkdir -p "$PKG"
94+
cp -r src Cargo.toml Cargo.lock README.md LICENSE "$PKG/"
95+
tar czvf "$TARBALL" "$PKG"
96+
cd "$PKG"
97+
dh_make -y -s -c apache -e [email protected] -f "$TARBALL"
98+
cd "$WORKDIR"
9699
dpkg-buildpackage -us -uc
97-
100+
98101
- name: Upload Debian package
99102
uses: actions/upload-artifact@v4
100103
with:

0 commit comments

Comments
 (0)