fix(ci): broken build workflow #130
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 | |
concurrency: | |
group: "build" | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
jobs: | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: "src" | |
- name: Checkout builds | |
uses: actions/checkout@master | |
with: | |
ref: "builds" | |
path: "builds" | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 11 | |
distribution: zulu | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
with: | |
cmdline-tools-version: 9862592 # 10.0 is the last version working with JDK 11 | |
- name: Build Plugins | |
run: | | |
cd $GITHUB_WORKSPACE/src | |
chmod +x gradlew | |
CI=true ./gradlew make generateUpdaterJson | |
rm $GITHUB_WORKSPACE/builds/* | |
cp **/build/*.zip $GITHUB_WORKSPACE/builds | |
cp build/updater.json $GITHUB_WORKSPACE/builds | |
- name: Push builds | |
run: | | |
cd $GITHUB_WORKSPACE/builds | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add * | |
git commit -m "build: commit $GITHUB_SHA" || exit 0 # do not error if nothing to commit | |
git push |