v1.11.53 - attempt to prevent players damaging and then killing thems… #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven | |
on: | |
push: | |
branches: [ master ] | |
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: Set plugin.yml version | |
run: | | |
sed -i 's/build-number/'$GITHUB_RUN_NUMBER'/g' src/main/resources/plugin.yml | |
- name: Build with Maven | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mkdir -p ~/.m2 | |
echo "<settings><activeProfiles><activeProfile>github</activeProfile></activeProfiles><profiles><profile><id>github</id><repositories><repository><id>github</id><url>https://maven.pkg.github.com/slipcor/Core</url><snapshots><enabled>true</enabled></snapshots></repository></repositories></profile></profiles><servers><server><id>github</id><username>$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')</username><password>\${env.GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml | |
mvn clean package --batch-mode | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: plugin-files | |
path: target/pvpstats.jar | |
- name: Post discord notification | |
run: | | |
commits=`echo "${{ join(github.event.commits.*.message, '\n - ') }}" | tr '\n' ' '` | |
payload_json='{"embeds":[{"color": 3066993,"title":"A new dev build of PVP Stats is available!","description":":spiral_note_pad: **New commits:**\n\n - '$commits' \n\n :arrow_right: [GitHub]('$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID')","footer":{"text":"Build '$GITHUB_RUN_ID' created at '$(date +'%Y-%m-%d %H:%M:%S')'"}}]}' | |
curl -X POST ${{ secrets.DISCORD_WEBHOOK }} -F payload_json="${payload_json}" | |
curl -X POST ${{ secrets.DISCORD_WEBHOOK }} -F file=@target/pvpstats.jar |