Update module.yml #23
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: Tạo module | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '.github/workflows/module.yml' | |
- '.github/Tvip.sh' | |
permissions: write-all | |
jobs: | |
build: | |
name: 'See progress' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: 'Start process' | |
run: | | |
# Kakathic | |
TOME="$GITHUB_WORKSPACE" | |
getmodun(){ grep -m1 "$1=" $TOME/.github/Widget/module.prop | cut -d= -f2; } | |
upenv(){ echo "$1=$2" >> $GITHUB_ENV; eval "$1=$2"; } | |
upenv VUR "$(getmodun version)" | |
upenv VSR "$(getmodun versionCode)" | |
chmod 777 .github/Tvip.sh | |
.github/Tvip.sh | |
cp -rf vip.sh .github/Widget/bin | |
cd .github/Widget | |
zip -r $GITHUB_WORKSPACE/WidgetOS_$(getmodun version).zip * | |
cd $GITHUB_WORKSPACE | |
echo '{ | |
"version": "'$VUR'", | |
"versionCode": "'$VSR'", | |
"zipUrl": "https://github.com/Zenlua/Widget/releases/download/V'$VUR'/WidgetOS_'${VUR}'.zip", | |
"changelog": "https://raw.githubusercontent.com/Zenlua/Widget/main/.github/Along.md" | |
}' > $TOME/overlay.json | |
- name: Upload zip | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Widget OS ${{ env.VUR }} | |
tag_name: V${{ env.VUR }} | |
files: ./*.zip | |
body_path: log.txt | |
- name: Upload json | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Tmp | |
tag_name: tmp | |
files: ./*.json |