Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit c8ac85b

Browse files
committed
Add workflows & polish stuff up for public [release]
1 parent fa7ebfe commit c8ac85b

File tree

8 files changed

+208
-3
lines changed

8 files changed

+208
-3
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Bug Report
2+
3+
description: Report broken or incorrect behaviour.
4+
5+
labels:
6+
- bug
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out a bug.
13+
If you want real-time support, consider joining our [Discord server](https://discord.gg/2BDyjxubRA) instead.
14+
15+
Please note that this form is for bugs only!
16+
17+
- type: input
18+
attributes:
19+
label: Summary
20+
description: A simple summary of your bug report.
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
attributes:
26+
label: Reproduction Steps
27+
description: What you did you do to make it happen?
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
attributes:
33+
label: Expected Results
34+
description: What did you expect to happen?
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
attributes:
40+
label: Actual Results
41+
description: What actually happened?
42+
validations:
43+
required: true
44+
45+
- type: checkboxes
46+
attributes:
47+
label: Checklist
48+
description: Let's make sure you've properly done due diligence when reporting this issue!
49+
options:
50+
- label: I have searched the open issues for duplicates.
51+
required: true
52+
- label: I am using the latest version of the library.
53+
required: true
54+
- label: I have shown the entire traceback, if possible.
55+
required: true
56+
57+
- type: textarea
58+
attributes:
59+
label: Additional Context
60+
description: If there is anything else to say, please do so here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
contact_links:
2+
- name: Ask a question
3+
about: Ask questions and discuss with other users of the library.
4+
url: https://github.com/Skulk-Network/Plugin/discussions
5+
6+
- name: Discord Server
7+
about: Use our official Discord server to ask for help and questions as well.
8+
url: https://discord.gg/2BDyjxubRA
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Feature Request
2+
3+
description: Suggest a feature for this library.
4+
5+
labels:
6+
- enhancement
7+
8+
body:
9+
- type: input
10+
attributes:
11+
label: Summary
12+
description: A short summary of what your feature request is.
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
attributes:
18+
label: Additional Context
19+
description: If there is anything else to say, please do so here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Summary
2+
3+
<!-- What is this pull request for? Does it fix any issues? -->
4+
5+
## Checklist
6+
7+
<!-- Put an x inside [ ] to check it, like so: [x] -->
8+
9+
- [ ] If code changes were made then they have been tested.
10+
- [ ] I have updated the documentation to reflect the changes.
11+
- [ ] This PR fixes an issue.
12+
- [ ] This PR adds something new (e.g. new class or optional parameter).
13+
- [ ] This PR tweaks some functionality.
14+
- [ ] This PR is a **breaking change** (e.g. methods or parameters removed/renamed)
15+
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build & Release
2+
3+
env:
4+
# CONFIGURATION START
5+
master_branch: master
6+
java_distribution: temurin
7+
java_version: 17
8+
artifact_name: lib-jar
9+
# CONFIGURATION END
10+
11+
on:
12+
- push
13+
- pull_request
14+
- workflow_dispatch
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v3
23+
24+
- name: Setup Java ${{ env.java_version }}
25+
uses: actions/setup-java@v2
26+
with:
27+
distribution: ${{ env.java_distribution }}
28+
java-version: ${{ env.java_version }}
29+
cache: maven
30+
31+
- name: Build Project
32+
run: mvn -B clean package
33+
34+
- name: Set JAR File Name Environment Variable
35+
run: echo "jar=$(ls target | grep -E "original.*\.jar" | cut -c10-)" >> $GITHUB_ENV
36+
37+
- name: Upload Artifact
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: ${{ env.artifact_name }}
41+
path: ./target/${{ env.jar }}
42+
43+
# TODO: publish to maven central.
44+
release:
45+
name: Release
46+
if: contains(github.event.head_commit.message, '[release]')
47+
runs-on: ubuntu-latest
48+
needs:
49+
- build
50+
steps:
51+
- name: Checkout Master Branch
52+
uses: actions/checkout@v3
53+
54+
- name: Download Artifact
55+
uses: actions/download-artifact@v3
56+
with:
57+
name: ${{ env.artifact_name }}
58+
path: ./artifacts
59+
60+
- name: Parse Artifact Name And Set Environment Variables
61+
run: |
62+
JAR=$(ls artifacts)
63+
echo "jar=$JAR" >> $GITHUB_ENV
64+
echo "jar_version=$(echo $JAR | cut -d '-' -f2 | cut -d '.' -f1-3)" >> $GITHUB_ENV
65+
echo "jar_name=$(echo $JAR | cut -d '-' -f1)" >> $GITHUB_ENV
66+
67+
- name: Create Release
68+
uses: softprops/action-gh-release@v1
69+
with:
70+
prerelease: ${{ contains(env.jar_version, 'b') || contains(env.jar_version, 'a') || startsWith(env.jar_version, '0') }}
71+
tag_name: ${{ env.jar_version }}
72+
name: ${{ env.jar_name }} ${{ env.jar_version }}
73+
files: ./artifacts/${{ env.jar }}
74+
body: |
75+
Version ${{ env.jar_version }} of ${{ env.jar_name }} has been released.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2020
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21-
DEALINGS IN THE SOFTWARE.
21+
DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
# Kraft
22

3-
TODO: Readme
3+
Kraft is a modern Kotlin wrapper for the Bukkit API.
4+
5+
## 📥 Installation
6+
7+
TODO (Haven't published to maven central yet.).
8+
9+
## 📄 License
10+
11+
The MIT License (MIT)
12+
13+
Copyright (c) 2022-present RGBCube
14+
15+
Permission is hereby granted, free of charge, to any person obtaining a
16+
copy of this software and associated documentation files (the "Software"),
17+
to deal in the Software without restriction, including without limitation
18+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
19+
and/or sell copies of the Software, and to permit persons to whom the
20+
Software is furnished to do so, subject to the following conditions:
21+
22+
The above copyright notice and this permission notice shall be included in
23+
all copies or substantial portions of the Software.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31+
DEALINGS IN THE SOFTWARE.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
<scope>provided</scope>
6161
</dependency>
6262
</dependencies>
63-
</project>
63+
</project>

0 commit comments

Comments
 (0)