Skip to content

Commit ef2f329

Browse files
committed
workflow fixed
1 parent 61ef09e commit ef2f329

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
tags:
66
- '*.*.*'
7-
branches:
8-
- master
7+
#branches:
8+
# - master
99

1010
jobs:
1111
create_release:
12-
if: github.ref == 'refs/heads/master'
12+
#if: github.ref == 'refs/heads/master'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3 # Use v3 for better performance and security
15+
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
1818

@@ -37,35 +37,29 @@ jobs:
3737
changelog_section_start="== Changelog =="
3838
readme_file="${{ env.readme_file }}"
3939
40-
# Read lines from the changelog section
4140
in_changelog=0
4241
release_notes=""
4342
while IFS= read -r line; do
44-
# Start extracting once we find the changelog section
4543
if [[ "$line" == "$changelog_section_start" ]]; then
4644
in_changelog=1
4745
continue
4846
fi
4947
50-
# Stop extracting if we reach another section or blank line
51-
if [[ $in_changelog -eq 1 && "$line" =~ ^== ]]; then
48+
if [[ $in_changelog -eq 1 && $(echo "$line" | grep -E '^==') ]]; then
5249
break
5350
fi
5451
55-
# Add valid lines to the release notes
5652
if [[ $in_changelog -eq 1 && -n "$line" ]]; then
5753
release_notes+="$line\n"
5854
fi
5955
done < "$readme_file"
6056
61-
# Check if release notes were extracted
6257
if [[ -z "$release_notes" ]]; then
6358
echo "::error::Failed to extract release notes from the changelog section."
6459
exit 1
6560
fi
6661
67-
# Set output
68-
echo "::set-output name=notes::$release_notes"
62+
echo "RELEASE_NOTES=$release_notes" >> $GITHUB_ENV
6963
7064
- name: Create zip file
7165
run: |
@@ -80,8 +74,8 @@ jobs:
8074
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8175
with:
8276
tag_name: ${{ github.ref_name }}
83-
release_name: "${{ env.plugin_version }}"
84-
body: ${{ steps.release_notes.outputs.notes }}
77+
release_name: "${{ github.ref_name }}"
78+
body: ${{ env.RELEASE_NOTES }}
8579
draft: false
8680
prerelease: false
8781

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
script.sh

0 commit comments

Comments
 (0)