forked from Upstream/Velocitab
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
# Builds, tests the project with Gradle
|
|
name: Java CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ 'master' ]
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'workflows/**'
|
|
- 'README.md'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up JDK 16
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '16'
|
|
distribution: 'temurin'
|
|
- name: Build with Gradle
|
|
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
|
with:
|
|
arguments: build
|
|
- name: Query Version
|
|
run: |
|
|
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
|
id: fetch-version
|
|
- name: Get Version
|
|
run: |
|
|
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
|
|
- name: Upload to Modrinth & Hangar
|
|
uses: WiIIiam278/mc-publish@hangar
|
|
with:
|
|
modrinth-id: Q10irTG0
|
|
modrinth-featured: false
|
|
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
|
modrinth-version-type: alpha
|
|
hangar-id: William278/Velocitab
|
|
hangar-token: ${{ secrets.HANGAR_API_KEY }}
|
|
hangar-version-type: Alpha
|
|
hangar-game-versions: |
|
|
3.2
|
|
files: target/Velocitab-*.jar
|
|
name: Velocitab v${{ env.version_name }}
|
|
version: ${{ env.version_name }}
|
|
changelog: ${{ github.event.head_commit.message }}
|
|
loaders: |
|
|
velocity
|
|
dependencies: |
|
|
luckperms | suggests | *
|
|
papiproxybridge | suggests | *
|
|
miniplaceholders | suggests | *
|
|
game-versions: |
|
|
1.16.5
|
|
1.17.1
|
|
1.18.2
|
|
1.19.4
|
|
java: 16
|
|
- name: Upload GitHub Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Velocitab Plugin
|
|
path: target/Velocitab-*.jar |