Skip to content

Commit

Permalink
Add CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
EinDev committed Jan 8, 2024
1 parent d8ffdc8 commit f0c3923
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 4 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Build the plugin
on: [ push ]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
spigot:
- 1.20.4-R0.1-SNAPSHOT
- 1.20.2-R0.1-SNAPSHOT
- 1.20.1-R0.1-SNAPSHOT
- 1.19.4-R0.1-SNAPSHOT
- 1.18.2-R0.1-SNAPSHOT
cloudnet:
- 3.4.5-RELEASE
- 3.3.0-RELEASE
steps:
- uses: actions/checkout@v4

- name: Cache maven repository
id: cache-mvn
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Maven
uses: stCarolas/[email protected]

- name: Package plugin
run: mvn package -Dspigot.version=${{ matrix.spigot }} -Dcloudnet.version=${{ matrix.cloudnet }}

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache maven repository
id: cache-mvn
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Maven
uses: stCarolas/[email protected]

- name: Package plugin
run: mvn package

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CloudNet-PlaceholderExpansion
path: target/*.jar
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
<papi.version>2.11.5</papi.version>
<cloudnet.version>3.4.5-RELEASE</cloudnet.version>
</properties>

<build>
Expand Down Expand Up @@ -61,25 +64,25 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<version>${papi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-wrapper-jvm</artifactId>
<version>3.4.5-RELEASE</version>
<version>${cloudnet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-bridge</artifactId>
<version>3.4.5-RELEASE</version>
<version>${cloudnet.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit f0c3923

Please sign in to comment.