-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (38 loc) · 1.33 KB
/
gen-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
41
42
43
44
45
46
47
name: Generate Plugin Index
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: List files
run: ls
- name: Install Index Generator
run: |
Invoke-WebRequest -Uri https://github.com/ClassIsland/ClassIsland.PluginIndexGenerator/releases/download/1.0.1.2/ClassIsland.PluginIndexGenerator.zip -OutFile ClassIsland.PluginIndexGenerator.zip
Expand-Archive -Path ClassIsland.PluginIndexGenerator.zip -DestinationPath .
- name: Generate Plugin Index
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir out/source/
./ClassIsland.PluginIndexGenerator.exe index out/source/index.json -b base.json -t $env:GITHUB_TOKEN
7z a "./out/index.zip" ./out/source/* -r -mx=9
rm -r -Force out/source/
- name: Generate MD5
run: |
pwsh -ep Bypass -c .\tools\generate-md5.ps1 ./out
- name: Upload to release
uses: ncipollo/release-action@v1
with:
tag: latest
allowUpdates: true
artifacts: ./out/*.zip,./out/*.md5sum
bodyFile: ./out/checksums.md
token: ${{ secrets.GITHUB_TOKEN }}