diff options
Diffstat (limited to '.github')
| -rwxr-xr-x[-rw-r--r--] | .github/scripts/test-no-error-reports.sh | 16 | ||||
| -rw-r--r-- | .github/workflows/build-and-test.yml | 10 | ||||
| -rw-r--r-- | .github/workflows/release-tags.yml | 16 |
3 files changed, 19 insertions, 23 deletions
diff --git a/.github/scripts/test-no-error-reports.sh b/.github/scripts/test-no-error-reports.sh index e3876606d5..84c1e5d650 100644..100755 --- a/.github/scripts/test-no-error-reports.sh +++ b/.github/scripts/test-no-error-reports.sh @@ -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 diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 08df9fe89f..2a74327ad6 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 @@ -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: | diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 96d37f7d9a..c86d8889b7 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -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 }} |
