-
Notifications
You must be signed in to change notification settings - Fork 201
58 lines (55 loc) · 2.11 KB
/
release.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
55
56
57
58
name: Release
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
compress_and_push_mods_versionned_assets:
name: "[${{ matrix.compress_format }}] Compress ${{ matrix.mod_version }}"
runs-on: ubuntu-latest
strategy:
matrix:
mod_version: ['1.0.0', '1.1.0', '1.1.1', '1.1.2', '1.2.0', '1.2.1']
compress_format: ['zip', '7z']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up zip
run: |
sudo chmod +x zip_script.sh
./zip_script.sh ${{ matrix.mod_version }} ${{ matrix.compress_format }} TOTK-Mods-collection_${{ github.ref_name }}_for-${{ matrix.mod_version }}.${{ matrix.compress_format }}
- name: Push the assets
uses: softprops/action-gh-release@v1
with:
files: TOTK-Mods-collection_${{ github.ref_name }}_for-${{ matrix.mod_version }}.${{ matrix.compress_format }}
compress_and_push_mods_assets:
name: "[zip, 7z] Compress all versions"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Compress mods to folder Releases
run: |
7z a -tzip -mx9 ./Releases/TOTK-Mods-collection_${{ github.ref_name }}_full.zip -x!'./.git/' -x!'./Releases/' -x!'./.github/' -x!'./config.yaml' ./
7z a -t7z -mx9 ./Releases/TOTK-Mods-collection_${{ github.ref_name }}_full.7z -x!'./.git/' -x!'./Releases/' -x!'./.github/' -x!'./config.yaml' ./
- name: Push the assets on Tag/Release
uses: softprops/action-gh-release@v1
with:
files: |
Releases/TOTK-Mods-collection_${{ github.ref_name }}_full.zip
Releases/TOTK-Mods-collection_${{ github.ref_name }}_full.7z
# - name: Checkout on main before pushing changes
# uses: actions/checkout@v3
# with:
# ref: main
# clean: false
# - name: Push new releases on main
# run: |
# git status
# git config user.name github-actions
# git config user.email [email protected]
# git add Releases/
# git commit -a -m "Pushing new release ${{ github.ref_name }}"
# git push