48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: Generate screenshots
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 14
|
|
- uses: openrndr/setup-opengl@v1.1
|
|
- name: Test glxinfo
|
|
run: |
|
|
echo $LD_LIBRARY_PATH
|
|
export GALLIUM_DRIVER=swr
|
|
xvfb-run glxinfo
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Collect screenshots
|
|
run: xvfb-run ./gradlew collectScreenshots
|
|
- name: Build main readme
|
|
run: xvfb-run ./gradlew buildMainReadme
|
|
- name: Prepare media branch
|
|
run: |
|
|
git config --global user.email "actions@openrndr.org"
|
|
git config --global user.name "OPENRNDR Actions"
|
|
git reset HEAD -- .
|
|
(git add README.md && git commit -m "add auto-generated README" && git push origin master) || true
|
|
(git add [a-z-]*/README.md && git commit -m "add demos to README.md" && git push origin master) || true
|
|
git checkout --orphan media
|
|
git reset HEAD -- .
|
|
git add [a-z-]*/images/*.png
|
|
git commit -m "add auto-generated media"
|
|
git push -f origin media
|
|
|