generated from curseforge-mirror/template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.36 KB
/
main.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
name: Pull and Upload Curseforge Files
on:
workflow_run:
workflows: ["Setup repository"]
types:
- completed
workflow_dispatch:
schedule:
- cron: '0 */3 * * *'
jobs:
pull_and_upload_files:
name: Pull and Upload Files
runs-on: ubuntu-latest
env:
SCRAPER_API_KEY: ${{ secrets.SCRAPER_API_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Run Main Script
run: python main.py
env:
ADDON_NAME: demodal
ADDON_ID: 631280
SCRAPER_API_KEY: ${{ env.SCRAPER_API_KEY }}
CF_API_TOKEN: ${{ env.CF_API_TOKEN }}
- name: Get current time
uses: srfrnk/current-time@master
id: current-time
with:
format: YYYY.MM.DD.HH.mm
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.current-time.outputs.formattedTime }}
name: v${{ steps.current-time.outputs.formattedTime }}
draft: false
prerelease: false
bodyFile: README.md
artifacts: "*.zip"
artifactContentType: application/zip
token: ${{ secrets.GITHUB_TOKEN }}