diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cd10527e..ca354193a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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]() • " link+="[GitHub]() • " link+="[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