mirror of
https://github.com/ArtemSBulgakov/buildozer-action.git
synced 2024-08-16 10:09:52 +02:00
Add filename output
This commit is contained in:
parent
0599011456
commit
c8888204e4
3 changed files with 21 additions and 0 deletions
|
@ -21,11 +21,20 @@ but adds some features and patches to use in GitHub Actions.
|
||||||
- _Default:_ `.` (top directory).
|
- _Default:_ `.` (top directory).
|
||||||
- Set to `src` if buildozer.spec is in `src` directory.
|
- Set to `src` if buildozer.spec is in `src` directory.
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
### `filename`
|
||||||
|
|
||||||
|
Filename of built package relative to repository root.
|
||||||
|
|
||||||
|
- Example: `test_app/bin/testapp-0.1-armeabi-v7a-debug.apk`
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Build with Buildozer
|
- name: Build with Buildozer
|
||||||
uses: ArtemSBulgakov/buildozer-action@v1
|
uses: ArtemSBulgakov/buildozer-action@v1
|
||||||
|
id: buildozer
|
||||||
with:
|
with:
|
||||||
command: buildozer android debug
|
command: buildozer android debug
|
||||||
workir: src
|
workir: src
|
||||||
|
|
|
@ -15,6 +15,10 @@ inputs:
|
||||||
required: true
|
required: true
|
||||||
default: .
|
default: .
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
filename:
|
||||||
|
description: Filename of built package
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: Dockerfile
|
image: Dockerfile
|
||||||
|
|
|
@ -26,3 +26,11 @@ fi
|
||||||
|
|
||||||
# Give access to root
|
# Give access to root
|
||||||
sudo chown -R root "$GITHUB_WORKSPACE"
|
sudo chown -R root "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
|
# Set output
|
||||||
|
if [ ! -d bin ]; then
|
||||||
|
echo ::error::Output directory does not exist. See Buildozer log for error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
filename=$(ls bin | head -n1)
|
||||||
|
echo ::set-output name=filename::"$INPUT_WORKDIR/bin/$filename"
|
||||||
|
|
Loading…
Reference in a new issue