Skip to content

Commit 7fb9606

Browse files
authored
Improved CI (#20)
2 parents 78cf5a6 + 211865b commit 7fb9606

File tree

7 files changed

+81
-61
lines changed

7 files changed

+81
-61
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @cloudnode-pro/smp

.github/dependabot.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "06:00"
9+
reviewers:
10+
- cloudnode-pro/smp
11+
- package-ecosystem: github-actions
12+
directory: /
13+
schedule:
14+
interval: weekly
15+
day: monday
16+
time: "06:00"
17+
reviewers:
18+
- cloudnode-pro/smp

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5050

5151

52-
- uses: actions/setup-java@v3
52+
- uses: actions/setup-java@v4
5353
with:
54-
distribution: 'corretto'
54+
distribution: 'temurin'
5555
java-version: 17
5656

5757
# Initializes the CodeQL tools for scanning.
5858
- name: Initialize CodeQL
59-
uses: github/codeql-action/init@v2
59+
uses: github/codeql-action/init@v3
6060
with:
6161
languages: ${{ matrix.language }}
6262
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -70,7 +70,7 @@ jobs:
7070
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
7171
# If this step fails, then you should remove it and run the build manually (see below)
7272
- name: Autobuild
73-
uses: github/codeql-action/autobuild@v2
73+
uses: github/codeql-action/autobuild@v3
7474

7575
# ℹ️ Command-line programs to run using the OS shell.
7676
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -83,6 +83,6 @@ jobs:
8383
# ./location_of_script_within_repo/buildscript.sh
8484

8585
- name: Perform CodeQL Analysis
86-
uses: github/codeql-action/analyze@v2
86+
uses: github/codeql-action/analyze@v3
8787
with:
8888
category: "/language:${{matrix.language}}"

.github/workflows/release.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Maven Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 17
20+
distribution: temurin
21+
cache: maven
22+
23+
- name: Get release version from tag
24+
run: |
25+
TAG=${{ github.event.release.tag_name }}
26+
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
27+
id: version
28+
29+
- name: Set project release version
30+
run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false
31+
32+
- name: Build and package Maven project
33+
run: mvn -B clean package --file pom.xml
34+
35+
- name: Upload to release
36+
uses: cloudnode-pro/[email protected]
37+
with:
38+
gh-token: ${{ github.token }}
39+
files: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar; type=application/java-archive
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Upload to Modrinth
44+
uses: cloudnode-pro/[email protected]
45+
with:
46+
token: '${{ secrets.MODRINTH_TOKEN }}'
47+
project: '${{ github.event.repository.custom_properties.modrinth_id }}'
48+
name: ${{ github.event.release.name == github.event.release.tag_name && format('EnchantBookPlus {0}', steps.version.outputs.VERSION) || github.event.release.name }}
49+
version: ${{ steps.version.outputs.VERSION }}
50+
changelog: ${{ github.event.release.body }}
51+
loaders: paper
52+
game-versions: |-
53+
1.20.x
54+
1.21.x
55+
files: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar
56+
dependencies: '[{"project_id":"N4CZEMrg","dependency_type":"optional"}]'

.github/workflows/release.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)