forked from Magisk-Modules-Alt-Repo/saturation
-
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (71 loc) · 3.06 KB
/
create&release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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 }}