Update release_apk.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release APK | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- 'release-*' | ||
jobs: | ||
build: | ||
name: Build the APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Prepare | ||
run: | | ||
mkdir -p bin/luci-app-argon-config | ||
cp -rf ./luasrc ./po ./root ./Makefile ./bin/luci-app-argon-config | ||
- name: Docker Build | ||
run: | | ||
docker pull openwrt/sdk:main-SNAPSHOT | ||
docker run --rm -u root -v "$(pwd)"/bin/:/home/build/openwrt/bin -v ${{ github.workspace }}/.github/workflows:/home/build/workflows openwrt/sdk /bin/sh /home/build/workflows/build.sh | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -x | ||
assets=() | ||
for asset in ./bin/packages/x86_64/base/*argon-config*.*; do | ||
assets+=("-a" "$asset") | ||
done | ||
tag_name=$(basename ${{github.ref}}) | ||
hub release create -p "${assets[@]}" -m "$tag_name" "$tag_name" | ||
- name: Upload Log | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: buildlog | ||
path: bin/logs.tar.xz |