Skip to content

Commit

Permalink
Merge pull request #6 from GTNewHorizons/maven
Browse files Browse the repository at this point in the history
BY-NC-SA 4.0
  • Loading branch information
Dream-Master authored Feb 14, 2022
2 parents 8e2763f + d665708 commit 908bd9a
Show file tree
Hide file tree
Showing 11 changed files with 734 additions and 155 deletions.
16 changes: 11 additions & 5 deletions .github/scripts/test-no-error-reports.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
if [[ -d "run/crash-reports" ]]; then
#!/usr/bin/env bash

RUNDIR="run"
CRASH="crash-reports"
SERVERLOG="server.log"

if [[ -d $RUNDIR/$CRASH ]]; then
echo "Crash reports detected:"
cat $directory/*
cat $RUNDIR/$CRASH/crash*.txt
exit 1
fi

if grep --quiet "Fatal errors were detected" server.log; then
if grep --quiet "Fatal errors were detected" $SERVERLOG; then
echo "Fatal errors detected:"
cat server.log
exit 1
fi

if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" $SERVERLOG; then
echo "Server force stopped:"
cat server.log
exit 1
fi

if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then
echo "Server didn't finish startup:"
cat server.log
exit 1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
with:
fetch-depth: 0

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -36,8 +36,8 @@ jobs:
- name: Run server for 1.5 minutes
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer | tee --append server.log || true
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
- name: Test no errors reported during server run
run: |
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,8 @@ jobs:
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar

- name: Set repository owner and name
run: |
echo "REPOSITORY_OWNER=${GITHUB_REPOSITORY%/*}" >> $GITHUB_ENV
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Publish package
- name: Publish to Maven
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACT_GROUP_ID: com.github.${{ env.REPOSITORY_OWNER }}
ARTIFACT_ID: "${{ env.REPOSITORY_NAME }}"
ARTIFACT_VERSION: "${{ env.RELEASE_VERSION }}"
REPOSITORY_NAME: "${{ env.REPOSITORY_NAME }}"
REPOSITORY_OWNER: "${{ env.REPOSITORY_OWNER }}"

MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gradle
.settings
/.idea/
/.vscode/
/run/
/build/
/eclipse/
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Any Github changes require admin approval
/.github/** @GTNewHorizons/admin

Loading

0 comments on commit 908bd9a

Please sign in to comment.