Skip to content

Commit

Permalink
Fixed release action steps with minimal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Feb 11, 2025
1 parent ed30f3c commit 1929a30
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,40 @@ on:
description: "Docker images for smoke testing (comma-separated, e.g., ubuntu:20.04,ubuntu:22.04,ubuntu:24.04)"
required: false
default: "ubuntu:20.04,ubuntu:22.04,ubuntu:24.04"
build_runner:
description: "os in which build steps run on"
required: false
default: "ubuntu-22.04"
type: string
jobs:
build-source-package:
runs-on: ubuntu-latest
runs-on: ${{ inputs.build_runner }}
continue-on-error: true
strategy:
matrix:
dist: ${{ fromJSON(vars.BUILD_DISTS) }}
steps:
- uses: actions/checkout@v4
with:
path: sources
- name: Validate configure.ac version matches GitHub Release (only on release)
if: github.event.release.tag_name != ''
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
# Extract the current version from configure.ac
CURRENT_VERSION=$(awk -F'[(),]' '/AC_INIT/ {print $3}' sources/configure.ac | tr -d ' ')
echo "Current configure.ac version: $CURRENT_VERSION"
echo "GitHub Release version: $VERSION"
# Check if versions match
if [ "$CURRENT_VERSION" != "$VERSION" ]; then
echo "❌ Version mismatch! configure.ac: $CURRENT_VERSION, GitHub Release: $VERSION"
exit 1 # Fail the build
else
echo "Version match. Proceeding with the build."
fi
- name: Install dependencies
run: |
sudo apt-get update && \
Expand Down Expand Up @@ -63,7 +87,8 @@ jobs:
memtier-benchmark_*.tar.*
build-binary-package:
runs-on: ubuntu-latest
runs-on: ${{ inputs.build_runner }}
continue-on-error: true
environment: build
strategy:
matrix:
Expand Down

0 comments on commit 1929a30

Please sign in to comment.