Skip to content

Update build.yml

Update build.yml #7

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get tag or commit id
id: get-version-id
uses: iawia002/get-tag-or-commit-id@v1
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Clean Maven
run: mvn clean
- name: Install dependencies and build
run: mvn install
- name: Run Jar
run: java -jar target/ForgeServerJAR.jar
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
target/ForgeServerJAR.jar
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.get-version-id.outputs.id }}
draft: false
prerelease: false