Update build.yml

This commit is contained in:
Xikaro 2024-01-05 17:25:02 +05:00
parent 51f8d9746c
commit 85f3a6ce04

View file

@ -21,8 +21,8 @@ jobs:
project_version: ${{ steps.info.outputs.project_version }}
mcversion: ${{ steps.info.outputs.mcversion }}
tag: ${{ steps.version.outputs.tag }}
news: ${{ steps.changelog.outputs.news }}
changelog: ${{ steps.changelog_full.outputs.description }}
news: ${{ steps.message.outputs.news }}
changelog: ${{ steps.changelog.outputs.description }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
@ -57,7 +57,7 @@ jobs:
fi
- name: Changelog Parser
id: changelog_full
id: changelog
uses: coditory/changelog-parser@v1.0.2
with:
path: CHANGELOG.md
@ -67,23 +67,26 @@ jobs:
shell: bash
run: |
header="## **${{ steps.info.outputs.project_name }}** был обновлен до ${{ steps.info.outputs.project_version }}! :tada:"
echo -e "header=$header" >> $GITHUB_OUTPUT
link+="[CurseForge](<https://www.curseforge.com/minecraft/modpacks/terrafirmagreg/files/5009295>) • "
link+="[GitHub](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/0.4.0>) • "
link+="[Issues](<https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/issues>)"
echo -e "link=$link" >> $GITHUB_OUTPUT
news=$(echo -e "${{ steps.changelog_full.outputs.description }}" | sed -n '/### Изменения/,/###/p' | sed '$d')
printf "%s\n" "news=$news" >> $GITHUB_OUTPUT
news="$header\n$link"
echo -e "$news" >> $GITHUB_OUTPUT
- name: Send Discord message
uses: hugoalh/send-discord-webhook-ghaction@v6.0.1
uses: tsickert/discord-webhook@v5.4.0
with:
key: "${{secrets.RELEASES_1_20}}"
webhook-url: "${{secrets.RELEASES_1_20}}"
username: "TerraFirmaGreg"
avatar_url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
content: "${{ steps.message.outputs.header }}\n${{ steps.message.outputs.link }}\n${{ steps.message.outputs.news }}"
avatar-url: "https://raw.githubusercontent.com/TerraFirmaGreg-Team/.github/main/branding/logo_new_year.png"
embed-title: "${{ steps.message.outputs.news }}"
embed-description: "${{ steps.changelog.outputs.description }}"
embed-url: https://github.com/TerraFirmaGreg-Team/TFG-Modpack-1.20.x/releases/tag/0.4.0
content: "${{ steps.changelog.outputs.description }}"
embed-color: "#57F287"
# build-cf-modpack:
# name: Build CF Modpack