Skip to content

Commit 5cfce79

Browse files
Copilotwysaid
andcommitted
Fix version extraction regex and update setup-java to v4
Co-authored-by: wysaid <[email protected]>
1 parent 56ef0b8 commit 5cfce79

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: sudo apt-get update && sudo apt-get install -y ninja-build
2929

3030
- name: Set up JDK 17
31-
uses: actions/setup-java@v3
31+
uses: actions/setup-java@v4
3232
with:
3333
java-version: '17'
3434
distribution: 'temurin'
@@ -56,7 +56,7 @@ jobs:
5656
5757
- name: Validate version matches project version
5858
run: |
59-
PROJECT_VERSION=$(grep -E '^\s*versionName\s*:' build.gradle | sed -E 's/.*versionName\s*:\s*"([^"]+)".*/\1/')
59+
PROJECT_VERSION=$(grep -E 'versionName\s*:' build.gradle | sed -E 's/.*versionName\s*:\s*"([^"]+)".*/\1/')
6060
TAG_VERSION="${{ steps.tag_version.outputs.version }}"
6161
6262
echo "Project version: $PROJECT_VERSION"
@@ -120,16 +120,12 @@ jobs:
120120
MAVEN_REPO="/tmp/maven-repo"
121121
ARTIFACTS_DIR="/tmp/release-artifacts"
122122
123-
# Find all AAR files
124-
find "$MAVEN_REPO" -name "*.aar" | while read aar_file; do
125-
# Extract variant info from path
126-
if [[ $aar_file =~ gpuimage-plus-([0-9.]+(-[^/]+)?)/gpuimage-plus-[0-9.]+(-[^/]+)?\.aar ]]; then
127-
VARIANT="${BASH_REMATCH[1]}"
128-
# Normalize variant name for file
129-
VARIANT_NAME=$(echo "$VARIANT" | sed 's/\./-/g')
130-
cp "$aar_file" "$ARTIFACTS_DIR/gpuimage-plus-${VARIANT}.aar"
131-
echo " ✓ Packaged: gpuimage-plus-${VARIANT}.aar"
132-
fi
123+
# Find and copy all AAR files from the maven repository
124+
# Expected structure: /tmp/maven-repo/org/wysaid/gpuimage-plus/{version}/gpuimage-plus-{version}.aar
125+
find "$MAVEN_REPO/org/wysaid/gpuimage-plus" -name "*.aar" | while read aar_file; do
126+
filename=$(basename "$aar_file")
127+
cp "$aar_file" "$ARTIFACTS_DIR/$filename"
128+
echo " ✓ Packaged: $filename"
133129
done
134130
135131
echo "✅ All AAR artifacts packaged"

0 commit comments

Comments
 (0)