diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..09ccb46 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ + +name: Build JaimesHut +on: + push: + pull_request: + release: + types: [published] + +jobs: + Build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Clone the repo + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Build with gradle + run: | + export VERSION="`if [[ $GITHUB_REF == refs\/tags* ]]; then echo ${GITHUB_REF//refs\/tags\//}; fi`" + if [ "$VERSION" = "" ]; + then + branch="`if [[ $GITHUB_REF == refs\/heads* ]]; then echo ${GITHUB_REF//refs\/heads\//}; fi`" + export VERSION="$branch-SNAPSHOT" + fi + gradle buildFatJar -Pin_version="$VERSION" + + - name: Upload to release + if: github.event_name == 'release' + run: | + releaseId=$(jq --raw-output '.release.id' ${GITHUB_EVENT_PATH}) + filename="`ls build/libs/JaimesHut-fat-*.jar`" + url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/$releaseId/assets?name=$(basename $filename)" + echo "Upload to $url" + curl -L \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/zip" \ + --data-binary @"$filename" \ + "$url" + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 719ee68..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: java -git: - lfs_skip_smudge: true -script: -- if [ "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_TAG" != "" ]; then git lfs pull; fi -- gradle buildFatJar -deploy: - provider: releases - skip_cleanup: true - file_glob: true - api_key: - secure: TZiFYf9lBtuu3yZmo4fvnjP6ZMd5cTH64lbUEWvAllCTzXxfLth0lvyjoByjewZ8vtI+E4K2Q6VUDkZtNayck2Kec75BU1W5Y50vrlJ3lnRQJmhfEHC2yYRwPq+zrGgZqExd2ro5xWLrUHwEu+sm+JED/7tPNsUPhVcSf2cPOB41FgQAUTAdKIAiHqpRObbYuhbTO4Sta6LHe3e6W4T8584Si4qYaNvEteHR8hRzj8ORzgdZRDTzhV2QRGxNbUuoTwnQAbxyRzcboHfCYceYkuLduxIhgSLWdwGRBxoBil6JwZMDyLVzAhvEbKcD97nYNh+LO0ZhCNK6OisJwrxB3Il8vK5Z7rwCESRfyQgW0OyWGgP1sEHRWr9fiw9C0K1p1AZD60+OH8KT6dRtpqxUBRU1MwZ58Nu4mPVEdo6lkvafGjlBmlijICpwbhSjtDBrrzoVedlfj+mx6KDAJSBWNCBQhH2AKh/97tu3fEGSYrQrz5xOCzUzwnAO6pvZX1lBiSBxAxBmZne23HhXomANFUUxDvCR0jdWmma5bc5yxOag7b0o4nyoA3Fo186Cm2yJTMpeJX+lNTTTrs38mjV+IZajZ3wOO1RH5BK1Hnt9fKNv2gCWWVnMa2Un9as1lAaAmrAg19IWm3zCzLZzqvGqd5KOJhgkcG0OtOHeqQwycuc= - file: build/libs/JaimesHut-fat-*.jar - on: - repo: jmePhonon/JaimesHut - tags: true