File tree 6 files changed +13
-14
lines changed
6 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 39
39
with :
40
40
download_url : " https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k=${{ secrets.LICENSE_KEY }}"
41
41
version : ${{ env.LATEST_VERSION }}
42
- changelog_extract : |
42
+ changelog_extract : |-
43
43
awk -v ver=${{ env.LATEST_VERSION }} '/^= / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' readme.txt 2>&1
Original file line number Diff line number Diff line change 54
54
with :
55
55
download_url : ${{ env.DOWNLOAD_URL }}
56
56
version : ${{ env.LATEST_VERSION }}
57
- changelog_extract : |
57
+ changelog_extract : |-
58
58
awk -v ver='${{ env.LATEST_VERSION }} -' '
59
59
BEGIN { RS="<h4>"; FS="</h4>"; }
60
60
$1 ~ ver {
Original file line number Diff line number Diff line change 56
56
with :
57
57
download_url : ${{ fromJson(env.REMOTE_RESPONSE).download_url_latest }}
58
58
version : ${{ fromJson(env.REMOTE_RESPONSE).version_latest }}
59
- changelog_extract : |
59
+ changelog_extract : |-
60
60
awk -v ver=${{ fromJson(env.REMOTE_RESPONSE).version_latest }} '/^### / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' change_log.txt 2>&1
Original file line number Diff line number Diff line change 56
56
with :
57
57
download_url : ${{ fromJson(env.REMOTE_RESPONSE).download_url }}
58
58
version : ${{ fromJson(env.REMOTE_RESPONSE).version }}
59
- changelog_extract : |
59
+ changelog_extract : |-
60
60
awk -v ver=${{ fromJson(env.REMOTE_RESPONSE).version }} ${{ inputs.changelog_awk_extract }}
Original file line number Diff line number Diff line change 62
62
with :
63
63
download_url : ${{ fromJson(env.REMOTE_RESPONSE).package }}
64
64
version : ${{ fromJson(env.REMOTE_RESPONSE).new_version }}
65
- changelog_extract : |
65
+ changelog_extract : |-
66
66
awk -v ver=${{ fromJson(env.REMOTE_RESPONSE).new_version }} '/^version / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' changelog.txt 2>&1
Original file line number Diff line number Diff line change @@ -72,21 +72,20 @@ runs:
72
72
shell : bash
73
73
run : |
74
74
{
75
- echo 'CHANGELOG<<EOF'
75
+ echo "v${{ inputs.version }}"
76
+ echo
76
77
${{ inputs.changelog_extract }}
77
- echo -e "\n"
78
- echo 'EOF'
79
- } >> "$GITHUB_ENV"
78
+ } >| /tmp/commit-message
80
79
81
80
- name : Retrieve changelog
82
81
if : ${{ env.RUN_BUILD == 'true' && inputs.changelog != '' }}
83
82
shell : bash
84
83
run : |
85
84
{
86
- echo 'CHANGELOG<<EOF'
85
+ echo "v${{ inputs.version }}"
86
+ echo
87
87
echo "${{ inputs.changelog }}"
88
- echo 'EOF'
89
- } >> "$GITHUB_ENV"
88
+ } >| /tmp/commit-message
90
89
91
90
- name : Commit the changes and push them
92
91
if : ${{ env.RUN_BUILD == 'true' }}
95
94
git config --global user.name "${GITHUB_ACTOR}"
96
95
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
97
96
git add .
98
- git commit -m "v${{ inputs.version }}" -m "${{ env.CHANGELOG }}"
99
- git tag --annotate ${{ inputs.version }} -m "v${{ inputs.version }}" -m "${{ env.CHANGELOG }}"
97
+ git commit --file /tmp/commit-message
98
+ git tag --annotate ${{ inputs.version }} --file /tmp/commit-message
100
99
git push
101
100
git push origin tag ${{ inputs.version }}
102
101
You can’t perform that action at this time.
0 commit comments