Skip to content

Automatically generate changelog #115

Automatically generate changelog

Automatically generate changelog #115

Workflow file for this run

name: build-and-release
on: [ pull_request, push ]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: download config files from brilliance
uses: robinraju/[email protected]
with:
repository: 'trackedout/Brilliance'
latest: true
fileName: '*.json'
out-file-path: 'brilliance-configs'
- name: build
env:
ORG_GRADLE_PROJECT_scoreboards_json: brilliance-configs/scoreboards.json
ORG_GRADLE_PROJECT_cards_json: brilliance-configs/Cards.json
ORG_GRADLE_PROJECT_artifacts_json: brilliance-configs/Artifacts.json
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/
- name: release-tag
uses: softprops/action-gh-release@v2
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' && matrix.java == '17' }}
with:
make_latest: true
files: |
build/libs/agronet-*
LICENSE
- name: release-latest
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
with:
make_latest: true
tag_name: latest
files: |
build/libs/agronet-*
LICENSE