@@ -11,28 +11,23 @@ jobs:
11
11
runs-on : ubuntu-latest
12
12
steps :
13
13
- uses : actions/checkout@v3
14
+
15
+ - name : Debug File List
16
+ run : ls -R
17
+
14
18
- name : Install SVN (Subversion)
15
19
run : |
16
20
sudo apt-get update
17
21
sudo apt-get install subversion
18
22
19
- - name : WordPress Plugin Deploy
20
- id : deploy
21
- uses : 10up/action-wordpress-plugin-deploy@stable
22
- with :
23
- generate-zip : true
24
-
25
23
- name : Find Readme File
26
24
id : find_readme
27
25
run : |
28
- for file in README.txt README.md Readme.txt Readme.md readme.txt readme.md; do
29
- if [ -f "$file" ]; then
30
- echo "Readme file found: $file"
31
- echo "readme_file=$file" >> $GITHUB_ENV
32
- break
33
- fi
34
- done
35
- if [ -z "${{ env.readme_file }}" ]; then
26
+ readme_file=$(find . -type f -iname "readme.*" | head -n 1)
27
+ if [ -n "$readme_file" ]; then
28
+ echo "Readme file found: $readme_file"
29
+ echo "readme_file=$readme_file" >> $GITHUB_ENV
30
+ else
36
31
echo "::error::Readme file not found."
37
32
exit 1
38
33
fi
@@ -47,32 +42,41 @@ jobs:
47
42
in_changelog=0
48
43
release_notes=""
49
44
while IFS= read -r line; do
50
- # Start extracting once we find the changelog section
51
45
if [[ "$line" == "$changelog_section_start" ]]; then
52
46
in_changelog=1
53
47
continue
54
48
fi
55
-
56
- # Stop extracting if we reach another section or blank line
57
49
if [[ $in_changelog -eq 1 && "$line" =~ ^== ]]; then
58
50
break
59
51
fi
60
-
61
- # Add valid lines to the release notes
62
52
if [[ $in_changelog -eq 1 && -n "$line" ]]; then
63
53
release_notes+="$line\n"
64
54
fi
65
55
done < "$readme_file"
66
56
67
- # Check if release notes were extracted
68
57
if [[ -z "$release_notes" ]]; then
69
58
echo "::error::Failed to extract release notes from the changelog section."
70
59
exit 1
71
60
fi
72
61
62
+ # Debug: Print extracted release notes
63
+ echo "Extracted release notes:"
64
+ echo "$release_notes"
65
+
73
66
# Set output
74
67
echo "::set-output name=notes::$release_notes"
75
68
69
+ - name : Debug Release Notes
70
+ run : |
71
+ echo "Debugging Release Notes:"
72
+ echo "${{ steps.release_notes.outputs.notes }}"
73
+
74
+ - name : WordPress Plugin Deploy
75
+ id : deploy
76
+ uses : 10up/action-wordpress-plugin-deploy@stable
77
+ with :
78
+ generate-zip : true
79
+
76
80
- name : Create GitHub Release
77
81
uses : softprops/action-gh-release@v2
78
82
with :
0 commit comments