Skip to content

Bump version to 2.5.3 #100

Bump version to 2.5.3

Bump version to 2.5.3 #100

name: Discord CI
on:
push:
branches:
- main
- hotfix
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: |
mvn clean package
- name: Deploy
run: |
rank="<@&793495434235609138>"
milestone=43
upload() {
file=$(find "./TradeSystem-Bundle/target" -type f -name "TradeSystem_v*.jar" | head -n 1)
name=${file##*/}
name=${name[@]//.jar/}
info=${name##*_}
version=${name:12}
version=${version[@]//_$info/}
if [ $info == $version ]
then
info="New release**__ - __**"
else
info=${info[@]//-/ }
info="$info**__ - __**"
fi
NOW="$(LC_ALL=en_GB.utf8 date --universal)"
echo "Sending '$file' to 'DevBuilds' channel, this may take a while..."
curl -i -H 'Expect: application/json' -F file=@"$file" -F "payload_json={ \"wait\": true, \"avatar_url\":\"https://i.imgur.com/x3pSH55.png\", \"content\": \"$rank\n__**$info$version**__ [$NOW]\n\n**Changelog:**\n<https://github.com/CodingAir/TradeSystem/milestone/$milestone?closed=1>\", \"username\": \"TradeSystem CI\" }" $1
}
upload ${{ secrets.DISCORD_WEBHOOK }}