-
Notifications
You must be signed in to change notification settings - Fork 16
54 lines (43 loc) · 1.75 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
name: Increment version number and export
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
VERSION: $(cat version)
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Increment Version"
run: echo "$(expr $(cat version) + 1)" > version
- name: "Update pack.mcmeta"
run: echo "{\"pack\":{\"pack_format\":11,\"description\":[\"\",{\"text\":\"Horizon's End\",\"color\":\"#88FF88\"},\" Resource Pack\",\"\nVersion $(cat version) \",{\"text\":\"/\",\"color\":\"#222222\"},\" horizonsend.net\"]}}" > pack.mcmeta
- name: "Commit updated Version and Meta"
uses: EndBug/[email protected]
with:
message: Increment Version Number
- name: Run PackSquash
uses: ComunidadAylas/PackSquash-action@v4
with:
packsquash_version: latest
options: |
# Optimize the pack in the root repository directory.
# This is the default value for pack_directory when no PackSquash options are defined
pack_directory = '.'
zip_spec_conformance_level = 'high'
allow_mods = ['OptiFine']
# Set a custom output file path to work with the generated ZIP file
# without needing to download its artifact in a separate step
output_file_path = '/tmp/HorizonsEndResourcePack.zip'
- name: "Save release number to environment variable"
run: echo "VERSION=$(cat version)" >> $GITHUB_ENV
- name: "Release"
uses: ncipollo/[email protected]
with:
artifacts: /tmp/HorizonsEndResourcePack.zip
commit: main
tag: Version${{ env.VERSION }}