Skip to content

Build pif

Build pif #4016

Workflow file for this run

name: Build pif
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install apktool
run: sudo apt-get install -y apktool
- name: Grant execute permission for script
run: chmod +x pif.sh
- name: Generate JSON file
run: ./pif.sh
- name: Check differences in custom.pif.json
run: |
if git diff --exit-code custom.pif.json; then
echo "custom.pif.json is the same, no need to commit."
echo "value=none" >> $GITHUB_ENV
else
echo "status=build" >> $GITHUB_ENV
fi
- name: Update custom.pif.json
if: env.status == 'build'
run: |
echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
git config --global user.name "tzagim"
git config --global user.email "[email protected]"
git add custom.pif.json
git commit -m "Update custom.pif.json"
git push
- name: 🔖 Create GitHub Release
uses: softprops/action-gh-release@v2
if: env.status == 'build'
with:
tag_name: ${{ env.date }}
files: custom.pif.json
- name: 🔖 Upload artifact
uses: actions/upload-artifact@v4
if: env.status == 'build'
with:
name: custom.pif.json
path: custom.pif.json