Skip to content

Commit 4d36147

Browse files
committed
Fix release workflow: create gradle.properties if it doesn't exist
- gradle.properties is in .gitignore, so it may not exist in the repository - Update workflow to create the file if missing before updating version - Matches pattern used in other gradle plugins
1 parent 7bf5d57 commit 4d36147

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ jobs:
5959
6060
- name: Update version in gradle.properties
6161
run: |
62-
sed -i "s/^version = .*/version = ${{ steps.version.outputs.version }}/" gradle.properties
62+
# Create gradle.properties if it doesn't exist
63+
if [ ! -f gradle.properties ]; then
64+
echo "version = ${{ steps.version.outputs.version }}" > gradle.properties
65+
else
66+
sed -i "s/^version = .*/version = ${{ steps.version.outputs.version }}/" gradle.properties
67+
fi
6368
cat gradle.properties
6469
6570
- name: Extract changelog for version

0 commit comments

Comments
 (0)