-
Notifications
You must be signed in to change notification settings - Fork 11
executable file
·67 lines (60 loc) · 2.08 KB
/
revanced.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
name: Build ReVanced
on: workflow_dispatch
jobs:
run:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Get last tag
id: last_tag
uses: oprypin/find-latest-tag@v1
continue-on-error: true
with:
token: ${{ secrets.TOKEN }}
repository: ${{ github.repository }}
releases-only: true
- name: Get next version code
id: next_ver_code
run: |
TAG="${{ steps.last_tag.outputs.tag }}"
if [ -z "$TAG" ]; then TAG=0; fi
echo "NEXT_VER_CODE=$((TAG + 1))" >> $GITHUB_OUTPUT
- name: Build APK
run: git pull && ./build.sh config.toml
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GITHUB_REPOSITORY: $GITHUB_REPOSITORY
NEXT_VER_CODE: ${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}
- name: Get output
id: get_output
run: |
DELIM="$(openssl rand -hex 8)"
echo "BUILD_LOG<<${DELIM}" >> "$GITHUB_OUTPUT"
cat build.md >> "$GITHUB_OUTPUT"
echo "${DELIM}" >> "$GITHUB_OUTPUT"
yt_v=$(cat $GITHUB_OUTPUT | grep "YouTube:" | head -n 1 | cut -d " " -f 2)
ytm_v=$(cat $GITHUB_OUTPUT | grep "Music:" | head -n 1 | cut -d " " -f 2)
if [ -z "$yt_v" ]; then
echo "RELEASE_NAME=YouTube ReVanced" >> $GITHUB_OUTPUT
else
echo "RELEASE_NAME= YouTube:v$yt_v Music:v$ytm_v" >> $GITHUB_OUTPUT
fi
- name: Upload to release
uses: svenstaro/upload-release-action@v2
with:
body: ${{ steps.get_output.outputs.BUILD_LOG }}
repo_token: ${{ secrets.TOKEN }}
file: ./build/*
release_name: ${{ steps.get_output.outputs.RELEASE_NAME }}
tag: ${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}
file_glob: true
overwrite: true