Skip to content

Auto build & release #52

Auto build & release

Auto build & release #52

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Auto build & release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'src/**'
- 'pom.xml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- run: mkdir staging && cp target/*.jar staging
- uses: actions/cache@v3.3.0
if: github.event_name != 'pull_request'
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: actions/upload-artifact@v4
if: github.event_name != 'pull_request'
with:
name: SlimeGlue.jar
path: staging
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@v1.2.1
if: github.event_name != 'pull_request'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "exp"
prerelease: true
title: "SlimeGlue exp version"
files: |
target/SlimeGlue-*.jar