-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (49 loc) · 1.9 KB
/
releasePackSquash.yaml
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
name: Release Workflow with pack squash
# Controls when the workflow will run
on:
# # Triggers the workflow on push or pull request events but only for the "master" branch
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
packsquash:
name: Optimize resource pack
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Get current date
id: tag
run: echo "tag=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Set release name
run: echo "RELEASE_NAME=HBCubemonde_${{env.date}}" >> $GITHUB_ENV
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # A non-shallow repository clone is required
- 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 = '.'
# 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/${{env.RELEASE_NAME}}.zip"
allow_mods = ['OptiFine']
# Temporary removing .properties processing because of accentued character encoding
['**/?*.properties']
minify_properties = false
- name: Tag and create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{env.date}}
name: ${{env.RELEASE_NAME}}
files: /tmp/${{env.RELEASE_NAME}}.zip