Files
pixel9-EU-combos/.github/workflows/release-lte-mod.yml
2025-02-08 23:21:46 +01:00

67 lines
1.9 KiB
YAML

name: Release Magisk module LTE
on:
workflow_dispatch:
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get date
id: date
run: echo "VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Read module.prop
id: module_prop
run: |
VERSION=$(grep "version=" p9_lte_combos_mod/module.prop | cut -d= -f2)
VERSIONCODE=$(grep "versionCode=" p9_lte_combos_mod/module.prop | cut -d= -f2)
echo "MOD_VERSION=$VERSION" >> $GITHUB_ENV
echo "MOD_VERSIONCODE=$VERSIONCODE" >> $GITHUB_ENV
- name: Zip folder
working-directory: ./
run: |
cd p9_lte_combos_mod
zip -r ../p9_lte_combos_mod.zip ./*
cd ..
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}
draft: false
prerelease: false
files: |
p9_lte_combos_mod.zip
- name: Update updater JSON
run: |
cat > updaterLTE.json << EOF
{
"version": "${{ env.MOD_VERSION }}",
"versionCode": ${{ env.MOD_VERSIONCODE }},
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ env.VERSION }}/p9_lte_combos_mod.zip",
"changelog": "https://github.com/${{ github.repository }}/releases/tag/${{ env.VERSION }}"
}
EOF
- name: Commit and push updater JSON
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add updaterLTE.json
git commit -m "Update updaterLTE.json for version ${{ env.MOD_VERSION }}"
git push