Removes the "archive version" override for the `shadowJar` task in the build file, resulting in a jar-file that contains the current version number in the filename. It's mostly a convenience tradeoff; either we can see the version directly in the filename and avoid assumptions, or we can easily overwrite an existing jar-file with a new one. Also updates the upload step of the build workflow to a glob pattern so we grab the file regardless of the version.
30 lines
580 B
YAML
30 lines
580 B
YAML
name: build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 'Set up JDK'
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '11'
|
|
distribution: 'adopt'
|
|
cache: 'gradle'
|
|
|
|
- name: 'Build, test, and package'
|
|
run: ./gradlew build --no-daemon
|
|
|
|
- name: 'Upload artifact'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: MobArena.jar
|
|
path: build/libs/MobArena-*.jar
|