Files
fortern-helper/.github/workflows/workflow.yml
T
Fortern 0f4c2904d0
Build Plugin / Build with Maven (push) Successful in 48s
ver 1.3
2026-06-08 13:17:56 +08:00

50 lines
1.1 KiB
YAML

name: Build Plugin
run-name: Building Plugin 🚀
on:
push:
tags:
- 'ver/**'
jobs:
build:
name: Build with Maven
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up JDK 25 and enable Maven cache
uses: actions/setup-java@v5
with:
distribution: 'liberica'
java-version: '25'
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.16
- name: Build and package with Maven
run: mvn -B package
- name: Determine version
id: set-version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/ver/}
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Upload built artifacts
uses: actions/upload-artifact@v3
with:
name: maven-artifacts
path: target/spigot/*.jar
- uses: ncipollo/release-action@v1
with:
artifacts: 'target/spigot/*.jar'
name: '${{ steps.set-version.outputs.version }} Release'