9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

Update CI

This commit is contained in:
violetc
2022-11-29 19:18:32 +08:00
parent d0bed56656
commit 02ad10d285
2 changed files with 18 additions and 4 deletions

View File

@@ -56,8 +56,20 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@v1.13.0
uses: LeGitHubDeTai/github-to-discord@main
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
username: "Leaves CI"
avatar_url: "https://avatars.githubusercontent.com/u/93428079"
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: "Leaves CI"
DISCORD_AVATAR: "https://avatars.githubusercontent.com/u/93428079"
MESSAGE_TITLE: ${{ env.name }}
MESSAGE_DESCRIPTION: "Leaves CI Action"
MESSAGE_URL: ${{ env.url }}
CONTENT: ${{ env.changelog }}
MESSAGE_COLOR: 5814783
SECTION_NAME: "ChangeLog"
AUTHOR_NAME: "LeavesMC"
AUTHOR_URL: null
AUTHOR_AVATAR: null
FOOTER_TEXT: null
FOOTER_URL: null
IMAGE: null

View File

@@ -24,6 +24,7 @@ echo "name=Leaves-$commitid" >> $GITHUB_ENV
echo "tag=$tagid" >> $GITHUB_ENV
echo "jar=$jarName" >> $GITHUB_ENV
echo "info=$releaseinfo" >> $GITHUB_ENV
echo "url=https://github.com/LeavesMC/Leaves/releases/tag/$tagid" >> $GITHUB_ENV
echo "Leaves-$commitid [![download](https://img.shields.io/github/downloads/LeavesMC/Leaves/$tagid/total?color=0)](https://github.com/Leaves/LeavesMC/releases/download/$tagid/$jarName)" >> $releaseinfo
echo "=====" >> $releaseinfo
@@ -32,6 +33,7 @@ echo "### Commit Message" >> $releaseinfo
number=$(git log --oneline master ^`git describe --tags --abbrev=0` | wc -l)
echo "$(git log --pretty='> [%h] %s' -$number)" >> $releaseinfo
echo "changelog=$(git log --pretty='> [%h] %s' -$number)" >> $GITHUB_ENV
echo "" >> $releaseinfo
echo "### Checksum" >> $releaseinfo