Skip to content

Commit 1747673

Browse files
committed
Publish to '-dev' as default
[skip ci]
1 parent e11b53c commit 1747673

File tree

3 files changed

+63
-3
lines changed

3 files changed

+63
-3
lines changed

.github/workflows/android.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
endpoint=${{secrets.WEBDAV_ADDRESS}}
8787
username=${{secrets.WEBDAV_USERNAME}}
8888
password=${{secrets.WEBDAV_PASSWORD}}
89-
root=/${{ env.release_version }}
89+
root=/${{ env.release_version }}-dev
9090
include: |
9191
app/build/outputs/apk/release/*.apk
9292
attempt_limit: 3
@@ -101,7 +101,7 @@ jobs:
101101
endpoint=${{secrets.WEBDAV_ADDRESS}}
102102
username=${{secrets.WEBDAV_USERNAME}}
103103
password=${{secrets.WEBDAV_PASSWORD}}
104-
root=/${{ env.release_version }}
104+
root=/${{ env.release_version }}-dev
105105
include: |
106106
module/build/release/zygisk-*.zip
107107
attempt_limit: 3
@@ -116,7 +116,7 @@ jobs:
116116
endpoint=${{secrets.WEBDAV_ADDRESS}}
117117
username=${{secrets.WEBDAV_USERNAME}}
118118
password=${{secrets.WEBDAV_PASSWORD}}
119-
root=/${{ env.release_version }}
119+
root=/${{ env.release_version }}-dev
120120
include: |
121121
module/build/release/riru-*.zip
122122
attempt_limit: 3

.github/workflows/cache_purge.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Cache Purge
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_run:
6+
workflows:
7+
- "Android CI"
8+
- "Release Published"
9+
types:
10+
- completed
11+
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Purge User Cache
18+
run: |
19+
curl --location --request POST "${WEBDAV_ADDRESS%/*}/api/admin/user/del_cache?username=guest" \
20+
--header "Authorization: $ALIST_TOKEN"
21+
env:
22+
ALIST_TOKEN: ${{secrets.ALIST_TOKEN}}
23+
WEBDAV_ADDRESS: ${{secrets.WEBDAV_ADDRESS_R}}
24+
shell: bash
25+
- name: Purge List Cache
26+
run: |
27+
curl --location "${WEBDAV_ADDRESS%/*}/api/fs/list" \
28+
--header "Authorization: $ALIST_TOKEN" \
29+
--header 'Content-Type: application/json' \
30+
--data '{ "path": "/download/fingerprintpay", "password": "", "page": 1, "per_page": 0, "refresh": true}'
31+
env:
32+
ALIST_TOKEN: ${{secrets.ALIST_TOKEN}}
33+
WEBDAV_ADDRESS: ${{secrets.WEBDAV_ADDRESS_R}}
34+
shell: bash
35+
36+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Published
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Publish release
13+
run: |
14+
RCLONE_CONFIG_WEBDAV_PASS=$(docker run --rm rclone/rclone obscure $WEBDAV_PASSWORD)
15+
docker run --rm \
16+
-e RCLONE_CONFIG_WEBDAV_TYPE=webdav \
17+
-e RCLONE_CONFIG_WEBDAV_USER=$RCLONE_CONFIG_WEBDAV_USER \
18+
-e RCLONE_CONFIG_WEBDAV_URL=$RCLONE_CONFIG_WEBDAV_URL \
19+
-e RCLONE_CONFIG_WEBDAV_PASS=$RCLONE_CONFIG_WEBDAV_PASS \
20+
rclone/rclone moveto webdav:/${{ github.event.release.name }}-dev webdav:/${{ github.event.release.name }}
21+
env:
22+
RCLONE_CONFIG_WEBDAV_USER: ${{secrets.WEBDAV_USERNAME}}
23+
RCLONE_CONFIG_WEBDAV_URL: ${{secrets.WEBDAV_ADDRESS}}
24+
WEBDAV_PASSWORD: ${{secrets.WEBDAV_PASSWORD}}

0 commit comments

Comments
 (0)