cloudstream-extensions-hexated/.github/workflows/build.yml

75 lines
2 KiB
YAML
Raw Normal View History

2022-08-31 04:26:39 +00:00
name: Build
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
2023-02-08 15:11:34 +00:00
concurrency:
2022-08-31 04:26:39 +00:00
group: "build"
cancel-in-progress: true
on:
push:
branches:
# choose your default branch
- master
- main
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
path: "src"
- name: Checkout builds
uses: actions/checkout@master
with:
ref: "builds"
path: "builds"
2023-02-08 15:11:34 +00:00
2022-08-31 04:26:39 +00:00
- name: Clean old builds
run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
2023-05-05 09:31:57 +00:00
- name: Access Secrets
2023-04-22 07:30:47 +00:00
env:
2023-04-22 09:20:33 +00:00
SORA_API: ${{ secrets.SORA_API }}
2023-05-05 09:31:57 +00:00
SORAHE: ${{ secrets.SORAHE }}
SORAXA: ${{ secrets.SORAXA }}
SORATED: ${{ secrets.SORATED }}
2023-05-05 11:54:17 +00:00
run: |
cd $GITHUB_WORKSPACE/src
echo SORA_API=$SORA_API >> local.properties
echo SORAHE=$SORAHE >> local.properties
echo SORAXA=$SORAXA >> local.properties
echo SORATED=$SORATED >> local.properties
2023-05-05 11:18:13 +00:00
# run: |
# cd $GITHUB_WORKSPACE/src
# echo $'SORA_API=$SORA_API\nSORAHE=$SORAHE\nSORAXA=$SORAXA\nSORATED=$SORATED' > local.properties
2023-04-22 07:30:47 +00:00
2022-08-31 04:26:39 +00:00
- name: Build Plugins
run: |
cd $GITHUB_WORKSPACE/src
chmod +x gradlew
./gradlew make makePluginsJson
cp **/build/*.cs3 $GITHUB_WORKSPACE/builds
cp build/plugins.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 --amend -m "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit
git push --force