Skip to content

Commit 332290c

Browse files
committed
#125: ci: Add commit hash in artifact
1 parent 510b401 commit 332290c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build-and-test-ubuntu.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,13 @@ jobs:
8888

8989
- name: Prepare Debian Package Structure
9090
run: |
91+
COMMIT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-7)
9192
mkdir -p pkg/DEBIAN
9293
mkdir -p pkg/usr/local/bin
9394
cp ${{ env.OUTPUT_DIR }}/tmp/pkg-artifacts/bin/vttv pkg/usr/local/bin/
9495
cat <<EOF > pkg/DEBIAN/control
9596
Package: vttv
96-
Version: 1.5.0
97+
Version: 1.6.0-${COMMIT_HASH}
9798
Section: base
9899
Priority: optional
99100
Architecture: amd64
@@ -103,7 +104,9 @@ jobs:
103104
EOF
104105
105106
- name: Build the Debian Package
106-
run: dpkg-deb --build pkg "${OUTPUT_DIR}/vttv-amd64-1-5-0.deb"
107+
run: |
108+
COMMIT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-7)
109+
dpkg-deb --build pkg "${OUTPUT_DIR}/vttv-amd64-${COMMIT_HASH}.deb"
107110
108111
- name: Clean out pkg-artifacts
109112
run: rm -rf "${OUTPUT_DIR}/tmp/pkg-artifacts"

0 commit comments

Comments
 (0)