Skip to content

Commit ff52f12

Browse files
committed
Init with basic mods
0 parents  commit ff52f12

84 files changed

Lines changed: 1906 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* -text
2+

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
inputs:
8+
publish_release:
9+
description: Publish release
10+
type: boolean
11+
default: false
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Install packwiz
23+
run: go install github.com/packwiz/packwiz@latest
24+
25+
- name: Add Go bin to PATH
26+
run: echo "$HOME/go/bin" >> "$GITHUB_PATH"
27+
28+
- name: Read versions
29+
id: vars
30+
run: |
31+
VERSION=$(awk -F'"' '$1 ~ /version =/ {print $2; exit}' pack.toml)
32+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
33+
echo "mc=1.21.10" >> "$GITHUB_OUTPUT"
34+
35+
- name: Export pack
36+
run: packwiz modrinth export
37+
38+
- name: Rename pack (push/pr or no release)
39+
if: github.event_name != 'workflow_dispatch' || inputs.publish_release != 'true'
40+
run: |
41+
mv "Lemon Packet-${{ steps.vars.outputs.version }}.mrpack" \
42+
"Lemon-Packet-v${{ steps.vars.outputs.version }}-mc${{ steps.vars.outputs.mc }}-build.${{ github.run_number }}.mrpack"
43+
44+
- name: Rename pack (release)
45+
if: github.event_name == 'workflow_dispatch' && inputs.publish_release == 'true'
46+
run: |
47+
mv "Lemon Packet-${{ steps.vars.outputs.version }}.mrpack" \
48+
"Lemon-Packet-v${{ steps.vars.outputs.version }}-mc${{ steps.vars.outputs.mc }}.mrpack"
49+
50+
- name: Upload artifact (push/pr or no release)
51+
if: github.event_name != 'workflow_dispatch' || inputs.publish_release != 'true'
52+
uses: actions/upload-artifact@v4
53+
with:
54+
path: Lemon-Packet-v${{ steps.vars.outputs.version }}-mc${{ steps.vars.outputs.mc }}-build.${{ github.run_number }}.mrpack
55+
56+
- name: Publish release
57+
if: github.event_name == 'workflow_dispatch' && inputs.publish_release == 'true'
58+
uses: Kir-Antipov/mc-publish@v3.3
59+
with:
60+
files: Lemon-Packet-v${{ steps.vars.outputs.version }}-mc${{ steps.vars.outputs.mc }}.mrpack
61+
name: ${{ format('{0} v{1} for mc{2}', 'Lemon Packet', steps.vars.outputs.version, '1.21.10') }}
62+
version: v${{ steps.vars.outputs.version }}
63+
modrinth-id: AABBCCDD
64+
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
65+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.zip
2+
*.mrpack
3+
.DS_Store
4+

LICENSE

Lines changed: 403 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)