zwallet/.github/workflows/build.yml

57 lines
1.4 KiB
YAML

name: Build and Release Android
on:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: docker/Dockerfile-dev
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/zwallet:latest
secrets: "pwd=${{ secrets.JKS_PASSWD }}"
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- uses: shrink/actions-docker-extract@v1
id: extract
with:
image: '${{ secrets.DOCKER_HUB_USERNAME }}/zwallet:latest'
path: '/root/.'
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
${{ steps.extract.outputs.destination }}/app-release.apk