Skip to content

Update build-ci.yml #200

Update build-ci.yml

Update build-ci.yml #200

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Slimefun Builder
on:
push:
branches:
- master
paths:
- 'src/**'
- 'pom.xml'
- '.github/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
java-package: jdk
architecture: x64
cache: maven
- name: Clean cache
run: mvn clean
- name: Build Slimefun
run: mvn -B package --errors
- name: Delete useless folders
run: |
rm -rf target/
- name: Maven Dependency Tree Dependency Submission
uses: advanced-security/[email protected]
- name: Delete useless files
run: |
rm -rf target/classes target/maven-archiver target/maven-status
rm target/original-*.jar
- uses: actions/upload-artifact@v4
name: Upload Beta artifact
with:
name: Slimefun Beta Build
path: target
- name: Automatic Releases
uses: marvinpinto/[email protected]
if: github.ref_name == 'master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "exp"
prerelease: true
title: "Slimefun 自动构建版本"
files: |
target/Slimefun-*.jar