Skip to content

Commit 80fa7c7

Browse files
Fixed release action steps with minimal changes (#299)
1 parent ed30f3c commit 80fa7c7

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,40 @@ on:
1717
description: "Docker images for smoke testing (comma-separated, e.g., ubuntu:20.04,ubuntu:22.04,ubuntu:24.04)"
1818
required: false
1919
default: "ubuntu:20.04,ubuntu:22.04,ubuntu:24.04"
20+
build_runner:
21+
description: "os in which build steps run on"
22+
required: false
23+
default: "ubuntu-22.04"
24+
type: string
2025
jobs:
2126
build-source-package:
22-
runs-on: ubuntu-latest
27+
runs-on: ${{ inputs.build_runner }}
28+
continue-on-error: true
2329
strategy:
2430
matrix:
2531
dist: ${{ fromJSON(vars.BUILD_DISTS) }}
2632
steps:
2733
- uses: actions/checkout@v4
2834
with:
2935
path: sources
36+
- name: Validate configure.ac version matches GitHub Release (only on release)
37+
if: github.event.release.tag_name != ''
38+
env:
39+
VERSION: ${{ github.event.release.tag_name }}
40+
run: |
41+
# Extract the current version from configure.ac
42+
CURRENT_VERSION=$(awk -F'[(),]' '/AC_INIT/ {print $3}' sources/configure.ac | tr -d ' ')
43+
44+
echo "Current configure.ac version: $CURRENT_VERSION"
45+
echo "GitHub Release version: $VERSION"
46+
47+
# Check if versions match
48+
if [ "$CURRENT_VERSION" != "$VERSION" ]; then
49+
echo "❌ Version mismatch! configure.ac: $CURRENT_VERSION, GitHub Release: $VERSION"
50+
exit 1 # Fail the build
51+
else
52+
echo "Version match. Proceeding with the build."
53+
fi
3054
- name: Install dependencies
3155
run: |
3256
sudo apt-get update && \
@@ -63,7 +87,8 @@ jobs:
6387
memtier-benchmark_*.tar.*
6488
6589
build-binary-package:
66-
runs-on: ubuntu-latest
90+
runs-on: ${{ inputs.build_runner }}
91+
continue-on-error: true
6792
environment: build
6893
strategy:
6994
matrix:
@@ -121,7 +146,7 @@ jobs:
121146
*.deb
122147
123148
smoke-test-packages:
124-
runs-on: ubuntu-latest
149+
runs-on: ${{ inputs.build_runner }}
125150
needs: build-binary-package
126151
env:
127152
ARCH: amd64

0 commit comments

Comments
 (0)