Skip to content

Commit

Permalink
Replace Travis CI with Github Actions.
Browse files Browse the repository at this point in the history
This commit introduces a Github Actions workflow in the form of the file
`.github/workflows/build.yml`, replacing Travis CI and its `.travis.yml`
file.

The new workflow does a little bit more than Travis CI: it uploads an
artifact after a successful build. Due to a known issue with Github's
package UI, the MobArena.jar file is dynamically zipped on download, so
we get MobArena.jar.zip containing just MobArena.jar. It's redundant,
but there doesn't seem to be a simple way around it at the time of this
commit, so we'll leave it be.

For now, the workflow runs on every push to every branch. I'm probably
going to regret that, but we'll leave that as it is for now as well.
  • Loading branch information
garbagemule committed Apr 15, 2021
1 parent c7e7400 commit b08c74a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build MobArena

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
- name: 'Set up JDK'
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: 'Cache dependencies'
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: 'Build, test, and package'
run: mvn -B package --file pom.xml
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
with:
name: MobArena.jar
path: target/MobArena.jar
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MobArena [![Build Status](https://travis-ci.org/garbagemule/MobArena.svg?branch=master)](https://travis-ci.org/garbagemule/MobArena)
MobArena [![Build Status](https://github.com/garbagemule/MobArena/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/garbagemule/MobArena/actions/workflows/build.yml)
========

MobArena is an arena-style minigame for Spigot-based Minecraft servers
Expand Down

0 comments on commit b08c74a

Please sign in to comment.