Catch all exceptions in BTTV/FFZ apis #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build mod on code change | |
on: | |
push: | |
paths: | |
- 'src/*' | |
- '**.java' | |
- '**.gradle' | |
- '.github/workflows/*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
if: always() | |
uses: actions/checkout@v2 | |
- name: Put commit hash/name in env variables | |
run: | | |
echo "GIT_HASH=$(git rev-parse --short=8 HEAD)" >> $GITHUB_ENV | |
echo "GIT_MESSAGE<<EOF" >> $GITHUB_ENV | |
git log -1 --pretty=%B >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache Gradle Files | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Upload Artifact if build passed | |
if: success() | |
uses: actions/upload-artifact@v1.0.0 | |
with: | |
name: Mod-Files | |
path: build/libs/ | |
- name: Get filenames to publish | |
if: success() | |
run: | | |
echo "BUILD_FILES<<EOF" >> $GITHUB_ENV | |
echo build/libs/StreamChatMod-git_*.jar >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Publish prerelease if build passed | |
if: success() && github.ref == 'refs/heads/master' | |
uses: "mini-bomba/create-github-release@main" | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: latest | |
prerelease: true | |
files: | | |
build/libs/StreamChatMod-git_*.jar | |
build/libs/StreamChatMod-v*.jar | |
clear_attachments: true | |
name: "Latest Commit (that compiles)" | |
body: | | |
This automatic prerelease is built from commit ${{ env.GIT_HASH }} and was triggered by @${{ github.actor }} | |
[Github Actions workflow run that built this prerelease](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
Commit message: | |
${{ env.GIT_MESSAGE }} |