Skip to content

Commit e8a7628

Browse files
authored
Merge pull request #16 from ModernBetaNetwork/automate-publishing
Automate packaging & flatten directory structure
2 parents 446bfc0 + 4351f53 commit e8a7628

1,488 files changed

Lines changed: 108 additions & 25 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.

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Package packs for release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
package-and-upload:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Get release version
16+
id: get_version
17+
run: |
18+
# get version from tag (remove 'v' prefix if present)
19+
VERSION=${GITHUB_REF#refs/tags/}
20+
VERSION=${VERSION#v}
21+
echo "version=$VERSION" >> $GITHUB_OUTPUT
22+
echo "Release version: $VERSION"
23+
24+
- name: Package for Bedrock Edition
25+
run: |
26+
if [ ! -d 'bedrock' ]; then
27+
echo 'ERROR: bedrock directory does not exist!'
28+
exit 1
29+
fi
30+
31+
if [ -f 'CREDITS.txt' ]; then
32+
cp CREDITS.txt bedrock/
33+
else
34+
echo 'WARN: CREDITS.txt does not exist'
35+
fi
36+
37+
cd bedrock
38+
zip -r '../bedrock.zip' .
39+
cd ..
40+
mv bedrock.zip 'ModernBetaBedrockResources-${{ steps.get_version.outputs.version }}.mcpack'
41+
42+
- name: Package for Java Edition
43+
run: |
44+
if [ ! -d 'java' ]; then
45+
echo 'ERROR: java directory does not exist!'
46+
exit 1
47+
fi
48+
49+
if [ -f 'CREDITS.txt' ]; then
50+
cp CREDITS.txt java/
51+
else
52+
echo 'WARN: CREDITS.txt does not exist'
53+
fi
54+
55+
cd java
56+
zip -r '../java.zip' .
57+
cd ..
58+
mv java.zip 'ModernBetaJavaResources-${{ steps.get_version.outputs.version }}.zip'
59+
60+
- name: Upload Bedrock package to release
61+
uses: actions/upload-release-asset@v1
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
with:
65+
upload_url: ${{ github.event.release.upload_url }}
66+
asset_path: ./ModernBetaBedrockResources-${{ steps.get_version.outputs.version }}.mcpack
67+
asset_name: ModernBetaBedrockResources-${{ steps.get_version.outputs.version }}.mcpack
68+
asset_content_type: application/zip
69+
70+
- name: Upload Java package to release
71+
uses: actions/upload-release-asset@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
upload_url: ${{ github.event.release.upload_url }}
76+
asset_path: ./ModernBetaJavaResources-${{ steps.get_version.outputs.version }}.zip
77+
asset_name: ModernBetaJavaResources-${{ steps.get_version.outputs.version }}.zip
78+
asset_content_type: application/zip

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# ignore packaged resourcepacks
22
*.mcpack
3-
*.zip
3+
*.zip
4+
5+
# macOS spam
6+
.DS_Store

CREDITS.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Modern Beta resource pack contributors:
2+
3+
Karltroid (Owner, Modern Beta)
4+
Stridey (Developer, Vanilla Tweaks)
5+
DartCat25 - Shaders
6+
PoeticRainbow (Creator, Golden Days pack) - Fixed chest model texture while using Enhanced Block Entities mod
7+
wwu - Translations & parity fixes

bedrock/1.20.80.5/manifest.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

bedrock/1.20.80.5/animation_controllers/skeleton.animation_controllers.json renamed to bedrock/animation_controllers/skeleton.animation_controllers.json

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)