Skip to content

inb4 this breaks all my plugins #196

inb4 this breaks all my plugins

inb4 this breaks all my plugins #196

Workflow file for this run

name: Build
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
concurrency:
group: "build"
cancel-in-progress: true
on:
push:
branches:
- main
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@master
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
- name: Build Plugins
run: |
cd $GITHUB_WORKSPACE/src
chmod +x gradlew
./gradlew make generateUpdaterJson --no-daemon
mkdir $GITHUB_WORKSPACE/compiled
cp $GITHUB_WORKSPACE/src/**/build/*.zip $GITHUB_WORKSPACE/compiled
cp $GITHUB_WORKSPACE/src/build/updater.json $GITHUB_WORKSPACE/compiled
- name: Upload plugins as artifacts
uses: actions/upload-artifact@v2
with:
name: plugins
path: compiled
- name: Push builds
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
cd $GITHUB_WORKSPACE/builds
cp $GITHUB_WORKSPACE/compiled/* .
git config --local user.email "[email protected]"
git config --local user.name "Your mom"
git add .
git commit -m "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit
git push