Let's try this again

This commit is contained in:
Yair Morgenstern 2021-07-02 17:46:04 +03:00 committed by GitHub
parent 998f05af50
commit 25785fd949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,6 @@ jobs:
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
echo this is a release!
wget -O jdk-windows-64.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip > /dev/null;
wget -O jdk-windows-32.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.252-2.b09-x86/java-1.8.0-openjdk-1.8.0.252-2.b09.ojdkbuild.windows.x86.zip > /dev/null;
wget -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default > /dev/null;
@ -74,9 +73,12 @@ jobs:
id: read_release
shell: bash
run: |
## To test this in Windows PS: cat .\changelog.md | wsl grep -Pzo --color '\\#{2}.3.15.7[^\\#]*?\\#{2}'
## To test this in Windows PS: cat .\changelog.md | wsl grep -Pzo --color '\\#{2}.3.15.7[^\\#]*?\\#{2}' | wsl head -n -2
r=$(grep -Pzo '\#{2}.${{steps.tag.outputs.tag}}[^\#]*\#' changelog.md) # grep to get only our release
#echo "$r"
echo "$r"
echo "------"
r=$(head -n -2 $r)
echo "$r"
#r="${r//'%'/'%25'}" # Multiline escape sequences for %
#r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
#r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
@ -89,7 +91,7 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: '${{ steps.read_release.outputs.RELEASE_BODY }}'
args: '"${{ steps.read_release.outputs.RELEASE_BODY }}"'
- name: Upload binaries to release
@ -101,5 +103,7 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true
# <--- Use environment variables that was created earlier - see https://github.com/svenstaro/upload-release-action
# Double-quotes so it will take the multiline, https://stackoverflow.com/questions/49457787
body: |
${{ steps.read_release.outputs.RELEASE_BODY }} # <--- Use environment variables that was created earlier - see https://github.com/svenstaro/upload-release-action
"${{ steps.read_release.outputs.RELEASE_BODY }}"