Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle and switch to github actions release/PR strategy #1

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mc-version:
- '1.19'
- '1.19.4'
- '1.20'
- '1.20.1'
- '1.20.6'
- '1.21'
- '1.21.3'
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build JAR with Gradle
run: |
./gradlew -PpaperApiVersion=${{ matrix.mc-version }}-R0.1-SNAPSHOT assemble
mv build/libs/reuse-it-*.jar .
- name: Upload JAR as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.mc-version }}
path: ./reuse-it-*.jar
release:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download JAR from artifact
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: ./reuse-it-*.jar
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mc-version:
- '1.19'
- '1.19.4'
- '1.20'
- '1.20.1'
- '1.20.6'
- '1.21'
- '1.21.3'
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build JAR with Gradle
run: ./gradlew -PpaperApiVersion=${{ matrix.mc-version }}-R0.1-SNAPSHOT assemble
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## prerequisites

* [Paper](https://papermc.io/downloads) 1.19
* [Vault](https://github.com/MilkBowl/VaultAPI) 1.7
* [Paper](https://papermc.io/downloads) 1.19 - 1.21
* [Vault](https://github.com/MilkBowl/VaultAPI) 1.7.1
* A plugin that supports the Vault Permissions API

## usage
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {
}

dependencies {
compileOnly 'io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT'
compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1'
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
compileOnly "io.papermc.paper:paper-api:${paperApiVersion}"
compileOnly "com.github.MilkBowl:VaultAPI:${vaultApiVersion}"
compileOnly "com.comphenix.protocol:ProtocolLib:${protocolLibVersion}"
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
paperApiVersion=1.19-R0.1-SNAPSHOT
vaultApiVersion=1.7.1
protocolLibVersion=4.8.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading