Files
spigot-event-producer/.gitea/workflows/ci.yml
T
dmg 12c0313947
Release / release (push) Has been cancelled
CI / build (push) Has been cancelled
feat: add Spigot event producer
2026-08-01 11:49:07 -04:00

47 lines
1.3 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Validate conventional commits
if: github.event_name == 'pull_request'
run: |
npx -y \
-p @commitlint/cli \
-p @commitlint/config-conventional \
commitlint --from "${{ github.event.pull_request.base.sha }}" --to "${{ github.sha }}" \
--extends @commitlint/config-conventional
- name: Build and test
run: ./gradlew clean check jar
- name: Name development artifact
run: |
short_sha=$(printf '%s' "$GITHUB_SHA" | cut -c1-7)
cp build/libs/spigot-event-producer-0.1.0-SNAPSHOT.jar \
"build/libs/spigot-event-producer-dev-${short_sha}.jar"
- name: Upload development artifact
uses: actions/upload-artifact@v3
with:
name: spigot-event-producer-${{ github.sha }}
path: build/libs/spigot-event-producer-dev-*.jar
if-no-files-found: error