v7.3.63 - add pale oak support #63
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: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: 'Set up JDK 1.11' | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- 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 | |
- name: 'Upload artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: TreeAssist.jar | |
path: target/TreeAssist.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 TreeAssist 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/TreeAssist.jar |