summaryrefslogtreecommitdiff
path: root/.github/workflows/android-publish.yml
diff options
context:
space:
mode:
authorGravatar liushuyu2023-06-10 21:51:45 -0600
committerGravatar Morph2023-06-30 14:26:55 -0400
commit14ea16e499e08281d683b7b3db87f6d45aa64098 (patch)
treed383f1d7ddec19da62bb1f80035899438833eb0e /.github/workflows/android-publish.yml
parentCI: add Android build workflow (diff)
downloadyuzu-14ea16e499e08281d683b7b3db87f6d45aa64098.tar.gz
yuzu-14ea16e499e08281d683b7b3db87f6d45aa64098.tar.xz
yuzu-14ea16e499e08281d683b7b3db87f6d45aa64098.zip
CI: add auto-publishing steps for Android
Diffstat (limited to '.github/workflows/android-publish.yml')
-rw-r--r--.github/workflows/android-publish.yml57
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/android-publish.yml b/.github/workflows/android-publish.yml
new file mode 100644
index 000000000..8f46fcf74
--- /dev/null
+++ b/.github/workflows/android-publish.yml
@@ -0,0 +1,57 @@
1# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
2# SPDX-License-Identifier: GPL-2.0-or-later
3
4name: yuzu-android-publish
5
6on:
7 schedule:
8 - cron: '37 0 * * *'
9 workflow_dispatch:
10 inputs:
11 android:
12 description: 'Whether to trigger an Android build (true/false/auto)'
13 required: false
14 default: 'true'
15
16jobs:
17 android:
18 runs-on: ubuntu-latest
19 if: ${{ github.event.inputs.android != 'false' && github.repository == 'yuzu-emu/yuzu' }}
20 steps:
21 # this checkout is required to make sure the GitHub Actions scripts are available
22 - uses: actions/checkout@v3
23 name: Pre-checkout
24 with:
25 submodules: false
26 - uses: actions/github-script@v6
27 id: check-changes
28 name: 'Check for new changes'
29 env:
30 # 24 hours
31 DETECTION_TIME_FRAME: 86400000
32 with:
33 script: |
34 if (context.payload.inputs && context.payload.inputs.android === 'true') return true;
35 const checkAndroidChanges = require('./.github/workflows/android-merge.js').checkAndroidChanges;
36 return checkAndroidChanges(github, context);
37 - run: npm install execa@5
38 if: ${{ steps.check-changes.outputs.result == 'true' }}
39 - uses: actions/checkout@v3
40 name: Checkout
41 if: ${{ steps.check-changes.outputs.result == 'true' }}
42 with:
43 path: 'yuzu-merge'
44 fetch-depth: 0
45 submodules: true
46 token: ${{ secrets.ALT_GITHUB_TOKEN }}
47 - uses: actions/github-script@v5
48 name: 'Check and merge Android changes'
49 if: ${{ steps.check-changes.outputs.result == 'true' }}
50 env:
51 ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
52 with:
53 script: |
54 const execa = require("execa");
55 const mergebot = require('./.github/workflows/android-merge.js').mergebot;
56 process.chdir('${{ github.workspace }}/yuzu-merge');
57 mergebot(github, context, execa);