Merge pull request #170 from hoverbike1/TOTK-Update-4.0 #64
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |