Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on:
push:
branches:
- '**'
pull_request:
workflow_dispatch:
inputs:
branch:
description: 'The branch to build'
required: true
default: 'master'
remote:
descriptoin: 'The custom remote link, e.g. https://github.com/Moulberry/NotEnoughUpdates'
required: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Alternate origin to user specified
if: ${{ github.event.inputs.remote != '' }}
run: |
git remote remove origin
git remote add origin ${{ github.event.inputs.remote }}
- name: Check out to the branch user specified
if: github.event_name == 'workflow_dispatch'
run: |
git fetch origin
git checkout origin/${{ github.event.inputs.branch }}
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup ForgeGradle
run: ./gradlew setupCIWorkspace
- name: Build with Gradle
run: ./gradlew build
- name: Upload mod jar
uses: actions/upload-artifact@v2
with:
name: NotEnoughUpdates
path: |
build/libs/*.jar
!build/libs/*-dep.jar
!build/libs/*-sources.jar