Skip to content

add metrics

add metrics #7

Workflow file for this run

name: Build Plugin
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "temurin"
- name: Extract version from pom.xml
id: get_version
run: echo "PLUGIN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Build with Maven
run: mvn clean package
- name: Upload plugin jar with version
if: github.event_name == 'push'
uses: actions/upload-artifact@v2
with:
name: diamondGuarantee-${{ env.PLUGIN_VERSION }}
path: target/diamondGuarantee-${{ env.PLUGIN_VERSION }}.jar
- name: Inform Discord
if: github.event_name == 'push'
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
username: GitHub Actions
avatar-url: https://avatars.githubusercontent.com/u/44036562
title: Plugin Build
description: Plugin build has been completed.
color: 3066993
status: ${{ job.status }}
fields: version=${{ env.PLUGIN_VERSION }}