Skip to content

Merge branch 'pre-rewrite/fabric/1.20.x' into purityhud1.20.1 #7

Merge branch 'pre-rewrite/fabric/1.20.x' into purityhud1.20.1

Merge branch 'pre-rewrite/fabric/1.20.x' into purityhud1.20.1 #7

Workflow file for this run

# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: build
on: [pull_request, push]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [17]
# and run on both Linux and Windows
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 50
- name: Get tags
run: git fetch --tags origin
- name: Extract version number
id: version_number
shell: bash
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/heads/})"
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
id: build
run: ./gradlew build
- name: "Build Changelog"
id: changelog
if: startsWith(github.ref, 'refs/tags/')
uses: wefhy/release-changelog-builder-action@develop
with:
commitMode: true
configuration: "changelog-configuration.json"
- 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/*.jar
- name: Github Release
uses: wefhy/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/libs/*.jar
# name: ${{github.ref}}
draft: true
body: ${{steps.changelog.outputs.changelog}}