mirror of
https://github.com/zontreck/AutoMoneyPlugin
synced 2025-06-19 02:13:55 +00:00
Initial commit
This commit is contained in:
commit
94a0826131
28 changed files with 2444 additions and 0 deletions
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
* @leviem1
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
github: leviem1
|
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Version information:**
|
||||
- Vanilla version: [e.g. 1.16.1]
|
||||
- Server version: [e.g. paper-123]
|
||||
- Plugin version [e.g. v0.1.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here including console errors.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
21
.github/actions/common-setup/action.yml
vendored
Normal file
21
.github/actions/common-setup/action.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: 'Common Setup'
|
||||
description: 'Set up JDK and grant execute permissions for gradlew'
|
||||
|
||||
inputs:
|
||||
java-version:
|
||||
description: 'Java version'
|
||||
required: true
|
||||
default: '21'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ inputs.java-version }}
|
||||
distribution: 'zulu'
|
||||
cache: gradle
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
20
.github/dependabot.yml
vendored
Normal file
20
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "build:"
|
||||
target-branch: "main"
|
||||
reviewers:
|
||||
- "leviem1"
|
||||
- package-ecosystem: "gradle"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "deps:"
|
||||
target-branch: "main"
|
||||
reviewers:
|
||||
- "leviem1"
|
20
.github/stale.yml
vendored
Normal file
20
.github/stale.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: false
|
||||
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- "low priority"
|
||||
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity.
|
||||
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
112
.github/workflows/main.yml
vendored
Normal file
112
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,112 @@
|
|||
name: Test and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
schedule:
|
||||
# PaperMC doesn't change version numbers for latest releases meaning the build may break
|
||||
# unexpectedly. Build every so often so that we know if a breaking change has been published
|
||||
- cron: '0 0 * * 6'
|
||||
|
||||
concurrency:
|
||||
group: ${{ format('{0}-{1}', github.workflow, github.ref) }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run unit tests
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest ]
|
||||
java: [ 21 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build --info
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} build results
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} test results
|
||||
path: ${{ github.workspace }}/build/reports/
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
with:
|
||||
java-version: 21
|
||||
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew -Pver="0.0.0-RC-1" release
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Release Build
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
notify:
|
||||
name: Send job complete notification
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test
|
||||
- release
|
||||
if: always() && vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
with:
|
||||
java-version: 21
|
||||
|
||||
- name: Retrieve Project Name
|
||||
run: echo "PROJECT_NAME=$(${{github.workspace}}/gradlew -q printProjectName)" >> $GITHUB_ENV
|
||||
|
||||
- name: Notify on success
|
||||
if: success()
|
||||
uses: appleboy/discord-action@v1.2.0
|
||||
with:
|
||||
webhook_id: ${{ vars.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#00FF00"
|
||||
username: "${{ env.PROJECT_NAME }} Release Bot"
|
||||
message: >
|
||||
An ${{ env.PROJECT_NAME }} snapshot was deployed by ${{ github.actor }}:
|
||||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
uses: appleboy/discord-action@v1.2.0
|
||||
with:
|
||||
webhook_id: ${{ vars.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#FF0000"
|
||||
username: "${{ env.PROJECT_NAME }} Release Bot"
|
||||
message: >
|
||||
An ${{ env.PROJECT_NAME }} snapshot deployment ran by ${{ github.actor }} failed:
|
||||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
46
.github/workflows/pr.yml
vendored
Normal file
46
.github/workflows/pr.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
merge_group:
|
||||
types:
|
||||
- checks_requested
|
||||
|
||||
concurrency:
|
||||
group: ${{ format('{0}-{1}', github.workflow, github.ref) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run unit tests
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest ]
|
||||
java: [ 21 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build --info
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} build results
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }} Java ${{ matrix.java }} test results
|
||||
path: ${{ github.workspace }}/build/reports/
|
43
.github/workflows/release.yml
vendored
Normal file
43
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Notify on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
name: Send job complete notification
|
||||
runs-on: ubuntu-latest
|
||||
if: vars.DISCORD_RELEASE_WEBHOOK_ID || vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
|
||||
- name: Retrieve Project Name
|
||||
run: echo "PROJECT_NAME=$(${{github.workspace}}/gradlew -q printProjectName)" >> $GITHUB_ENV
|
||||
id: project_name
|
||||
|
||||
- name: Set pre-release environment
|
||||
if: ${{ github.event.release.prerelease }}
|
||||
run: |
|
||||
echo "RELEASE_TYPE=pre-release" >> $GITHUB_ENV
|
||||
|
||||
- name: Set release environment
|
||||
if: ${{ !github.event.release.prerelease }}
|
||||
run: |
|
||||
echo "RELEASE_TYPE=release" >> $GITHUB_ENV
|
||||
|
||||
- name: Notify
|
||||
uses: appleboy/discord-action@v1.2.0
|
||||
with:
|
||||
webhook_id: ${{ !github.event.release.prerelease && vars.DISCORD_RELEASE_WEBHOOK_ID || vars.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ !github.event.release.prerelease && secrets.DISCORD_RELEASE_WEBHOOK_TOKEN || secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#00FF00"
|
||||
username: "${{ env.PROJECT_NAME }} Release Bot"
|
||||
message: >
|
||||
An ${{ env.PROJECT_NAME }} ${{ env.RELEASE_TYPE }} was deployed by ${{ github.actor }}:
|
||||
https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
|
84
.github/workflows/tag.yml
vendored
Normal file
84
.github/workflows/tag.yml
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # For v1.0, v0.1.0, etc
|
||||
|
||||
concurrency:
|
||||
group: ${{ format('{0}-{1}', github.workflow, github.ref) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew -Pver=${{ github.ref_name }} release
|
||||
|
||||
- name: Upload build results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Release Build
|
||||
path: ${{ github.workspace }}/build/libs/
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
id: release
|
||||
with:
|
||||
files: ${{ github.workspace }}/build/libs/*
|
||||
generate_release_notes: true
|
||||
name: ${{ format('Release {0}', github.ref_name) }}
|
||||
prerelease: ${{ contains(github.ref_name, '-rc-') }}
|
||||
fail_on_unmatched_files: true
|
||||
draft: true
|
||||
outputs:
|
||||
url: ${{ steps.release.outputs.url }}
|
||||
|
||||
notify:
|
||||
name: Send job complete notification
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- release
|
||||
if: always() && vars.DISCORD_WEBHOOK_ID
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Common Setup
|
||||
uses: ./.github/actions/common-setup
|
||||
with:
|
||||
java-version: 21
|
||||
|
||||
- name: Retrieve Project Name
|
||||
run: echo "PROJECT_NAME=$(${{github.workspace}}/gradlew -q printProjectName)" >> $GITHUB_ENV
|
||||
|
||||
- name: Notify on success
|
||||
if: success()
|
||||
uses: appleboy/discord-action@v1.2.0
|
||||
with:
|
||||
webhook_id: ${{ vars.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#00FF00"
|
||||
username: "${{ env.PROJECT_NAME }} Release Bot"
|
||||
message: >
|
||||
An ${{ env.PROJECT_NAME }} release draft was deployed by ${{ github.actor }}:
|
||||
${{ needs.release.outputs.url }}
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
uses: appleboy/discord-action@v1.2.0
|
||||
with:
|
||||
webhook_id: ${{ vars.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#FF0000"
|
||||
username: "${{ env.PROJECT_NAME }} Release Bot"
|
||||
message: >
|
||||
An ${{ env.PROJECT_NAME }} release draft ran by ${{ github.actor }} failed:
|
||||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
Loading…
Add table
Add a link
Reference in a new issue