File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' *.*.*'
7+ branches :
8+ - master # Restrict tags to master branch
79
810jobs :
911 create_release :
12+ if : github.ref == 'refs/heads/master' # Ensure the job only runs for master
1013 runs-on : ubuntu-latest
1114 steps :
1215 - uses : actions/checkout@v3
@@ -32,12 +35,11 @@ jobs:
3235 id : release_notes
3336 run : |
3437 changelog_section_start="== Changelog =="
35- readme_file="${{ env. readme_file }} "
38+ readme_file="$readme_file"
3639 plugin_version="${{ github.ref_name }}" # Assuming the tag is the version
3740
3841 in_changelog=0
3942 release_notes=""
40-
4143 while IFS= read -r line; do
4244 if [[ "$line" == "$changelog_section_start" ]]; then
4345 in_changelog=1
@@ -58,16 +60,11 @@ jobs:
5860 exit 1
5961 fi
6062
61- # Save release notes to GITHUB_ENV in a safe way
63+ # Use the <<EOF syntax to handle multi-line environment variables correctly
6264 echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
6365 printf "%s\n" "$release_notes" >> $GITHUB_ENV
6466 echo "EOF" >> $GITHUB_ENV
6567
66- - name : Debug Release Notes
67- run : |
68- echo "Extracted Release Notes:"
69- echo "${{ env.RELEASE_NOTES }}"
70-
7168 - name : Create zip file
7269 run : |
7370 REPO_NAME=$(basename `git rev-parse --show-toplevel`)
You can’t perform that action at this time.
0 commit comments