-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (36 loc) · 1.26 KB
/
update_index.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
name: Update
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "50 22 * * *" # 6:50 AM UTC+8
jobs:
Generate:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Generate rule-set index
run: |
git clone -b meta --depth=1 https://github.com/MetaCubeX/meta-rules-dat.git meta
git clone -b sing --depth=1 https://github.com/MetaCubeX/meta-rules-dat.git sing
node generate-lite.mjs
openssl dgst -sha256 meta.json | sed 's/([^)]*)//g' > meta-version.txt
openssl dgst -sha256 sing.json | sed 's/([^)]*)//g' > sing-version.txt
node generate-full.mjs
openssl dgst -sha256 meta-full.json | sed 's/([^)]*)//g' > meta-full-version.txt
openssl dgst -sha256 sing-full.json | sed 's/([^)]*)//g' > sing-full-version.txt
- name: Create Release and Upload Assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./{*.json,*.txt}
file_glob: true
tag: latest
release_name: latest
overwrite: true
draft: false
prerelease: false
body: ""