Skip to content

create&release

create&release #21

# create&release workflow for Magisk Module Git v1.0.0 by Ali BEYAZ
name: create&release
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: symbuzzer/fork-checkout-repo@main
with:
persist-credentials: false
fetch-depth: 0
- name: Create release directory
run: |
mkdir -p release
- name: Get module version
id: version
uses: symbuzzer/fork-github-action-json-property@master
with:
path: 'update.json'
prop_path: 'version'
- name: Create module 1.5 files
run: |
sed -i '13s/.*/service call SurfaceFlinger 1022 f 1.5/' service.sh
sed -i '6s/.*/description=Increase the saturation of the panel to 1.5x./' module.prop
sed -i '7s~.*~updateJson=https://raw.githubusercontent.com/symbuzzer/oled2lcd/main/update15.json~' module.prop
- name: Modify update.json zipUrl
uses: symbuzzer/fork-action-set-json-field@master
with:
file: update.json
field: zipUrl
value: https://github.com/symbuzzer/oled2lcd/releases/latest/download/oled2lcd_1.5x.zip
- name: Create update15.json
run: |
sudo cp update.json update15.json
- name: Create module 1.5 zip
run: |
sudo zip -r release/${{ github.event.repository.name }}_1.5x.zip * --exclude release/\* --exclude \*.zip
- name: Create module 2.0 files
run: |
sed -i '13s/.*/service call SurfaceFlinger 1022 f 2.0/' service.sh
sed -i '6s/.*/description=Increase the saturation of the panel to 2.0x./' module.prop
sed -i '7s~.*~updateJson=https://raw.githubusercontent.com/symbuzzer/oled2lcd/main/update.json~' module.prop
- name: Modify update.json zipUrl
uses: symbuzzer/fork-action-set-json-field@master
with:
file: update.json
field: zipUrl
value: https://github.com/symbuzzer/oled2lcd/releases/latest/download/oled2lcd_2.0x.zip
- name: Create module 2.0 zip
run: |
sudo zip -r release/${{ github.event.repository.name }}_2.0x.zip * --exclude release/\* --exclude \*.zip
- name: Create and upload release asset
uses: symbuzzer/fork-github-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{steps.version.outputs.prop}}
name: ${{steps.version.outputs.prop}}
body: Please check [changelog](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/CHANGELOG.md) for changes
files: release/*
gzip: false
draft: false
prerelease: false
allow_override: true
- name: Cleanup release directory
run: |
rm -rf release
- name: Commit and push changes
uses: symbuzzer/fork-push-changes@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}