Skip to content

Merge pull request #1 from LaylaMeower/develop #6

Merge pull request #1 from LaylaMeower/develop

Merge pull request #1 from LaylaMeower/develop #6

Workflow file for this run

name: Build & Publish
on:
push:
branches:
- root
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
dependency-graph: generate-and-submit
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: JARs
path: build/libs/*.jar
if-no-files-found: warn
- name: Validate version
id: version
run: |
VERSION=$(cat .version)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
if git show-ref --tags --verify --quiet "refs/tags/${VERSION}"; then
echo "Version ${VERSION} was already released"
exit 0
fi
- name: Release artifacts
uses: marvinpinto/action-automatic-releases@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
automatic_release_tag: ${{ steps.version.outputs.version }}
files: |
build/libs/*.jar
LICENSE.md