mirror of
https://github.com/ArtemSBulgakov/buildozer-action.git
synced 2024-08-16 10:09:52 +02:00
Move uploading binaries to branch to <details>
This commit is contained in:
parent
02f38ec378
commit
cb11b8d680
1 changed files with 52 additions and 50 deletions
102
README.md
102
README.md
|
@ -154,66 +154,56 @@ git push origin data
|
||||||
|
|
||||||
## Full workflow
|
## Full workflow
|
||||||
|
|
||||||
Builds app and uploads to the `data` branch. Also copy
|
Full workflow with uploading binaries as artifact.
|
||||||
[.ci/move_binary.py](.ci/move_binary.py) script and create `data` branch as
|
|
||||||
described above.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Build
|
name: Build
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- data
|
|
||||||
- gh-pages
|
|
||||||
tags:
|
|
||||||
- '**'
|
|
||||||
pull_request:
|
|
||||||
branches-ignore:
|
|
||||||
- data
|
|
||||||
- gh-pages
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job. Builds app for Android with Buildozer
|
# Build job. Builds app for Android with Buildozer
|
||||||
build-android:
|
build-android:
|
||||||
name: Build for Android
|
name: Build for Android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: master
|
|
||||||
|
|
||||||
- name: Build with Buildozer
|
- name: Build with Buildozer
|
||||||
uses: ArtemSBulgakov/buildozer-action@v1
|
uses: ArtemSBulgakov/buildozer-action@v1
|
||||||
id: buildozer
|
id: buildozer
|
||||||
with:
|
with:
|
||||||
repository_root: master
|
workdir: test_app
|
||||||
workdir: test_app
|
buildozer_version: stable
|
||||||
buildozer_version: stable
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Upload artifacts
|
||||||
uses: actions/checkout@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: data
|
name: package
|
||||||
ref: data # Branch name
|
path: ${{ steps.buildozer.outputs.filename }}
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
architecture: x64
|
|
||||||
|
|
||||||
- name: Push binary to data branch
|
|
||||||
run: python master/.ci/move_binary.py "${{ steps.buildozer.outputs.filename }}" master data
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Full workflow with uploading binaries as artifact</summary>
|
<summary>Full workflow with uploading binaries to branch</summary>
|
||||||
|
|
||||||
|
Builds app and uploads to the `data` branch. Also copy
|
||||||
|
[.ci/move_binary.py](.ci/move_binary.py) script and create `data` branch as
|
||||||
|
described above.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Build
|
name: Build
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- data
|
||||||
|
- gh-pages
|
||||||
|
tags:
|
||||||
|
- '**'
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- data
|
||||||
|
- gh-pages
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job. Builds app for Android with Buildozer
|
# Build job. Builds app for Android with Buildozer
|
||||||
|
@ -224,19 +214,31 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: master
|
||||||
|
|
||||||
- name: Build with Buildozer
|
- name: Build with Buildozer
|
||||||
uses: ArtemSBulgakov/buildozer-action@v1
|
uses: ArtemSBulgakov/buildozer-action@v1
|
||||||
id: buildozer
|
id: buildozer
|
||||||
with:
|
with:
|
||||||
|
repository_root: master
|
||||||
workdir: test_app
|
workdir: test_app
|
||||||
buildozer_version: stable
|
buildozer_version: stable
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Checkout
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
name: package
|
path: data
|
||||||
path: ${{ steps.buildozer.outputs.filename }}
|
ref: data # Branch name
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
architecture: x64
|
||||||
|
|
||||||
|
- name: Push binary to data branch
|
||||||
|
run: python master/.ci/move_binary.py "${{ steps.buildozer.outputs.filename }}" master data
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue