This repository was archived by the owner on Dec 26, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.66 KB
/
build.yml
File metadata and controls
74 lines (61 loc) · 1.66 KB
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
68
69
70
71
72
73
74
name: Build
on:
push:
branches:
- main
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
env:
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Install packwiz
run: go install github.com/packwiz/packwiz@latest
- name: Set up Packwiz cache
uses: actions/cache@v3
with:
path: ~/.cache/packwiz/cache/
key: ${{ runner.os }}-packwiz-store
restore-keys: ${{ runner.os }}-packwiz-store
- name: Set up pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --prod
- name: Build Modrinth pack
run: pnpm run client:modrinth
- name: Upload Modrinth pack
uses: actions/upload-artifact@v3
with:
name: Modrinth Pack
path: build/Natureal-*.mrpack
- name: Build CurseForge pack
run: |
pnpm run client:curseForge
pnpm run server:curseForge
- name: Upload CurseForge pack
uses: actions/upload-artifact@v3
with:
name: CurseForge Pack
path: build/Natureal-*.cf.zip
- name: Send webhook notification
if: always()
run: |
git clone https://github.com/Encode42/discord-workflows-webhook.git webhook
bash webhook/send.sh ${{ job.status }} ${{ secrets.WEBHOOK_URL }}
shell: bash