1
0
Fork 0
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:
Artem Bulgakov 2020-06-23 15:07:13 +03:00
parent 0599011456
commit c8888204e4
3 changed files with 21 additions and 0 deletions

View file

@ -21,11 +21,20 @@ but adds some features and patches to use in GitHub Actions.
- _Default:_ `.` (top 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
```yaml
- name: Build with Buildozer
uses: ArtemSBulgakov/buildozer-action@v1
id: buildozer
with:
command: buildozer android debug
workir: src

View file

@ -15,6 +15,10 @@ inputs:
required: true
default: .
outputs:
filename:
description: Filename of built package
runs:
using: docker
image: Dockerfile

View file

@ -26,3 +26,11 @@ fi
# Give access to root
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"