Skip to content

Make ZIP and release (Windows) #21

Make ZIP and release (Windows)

Make ZIP and release (Windows) #21

name: Make ZIP and release (Windows)
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag'
default: 'v1.21.'
required: true
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: git clone
run: |
git clone https://${{ secrets.MURGI }}@github.com/mcpebd/mtrls.git
- name: Make ZIP
run: |
pushd 'mtrls/windows' ; zip -r -6 ../../materials_windows_${{ github.event.inputs.release_tag }}.zip * -x "*.git*" ".github/*" ".gitignore" ; popd
pushd 'mtrls/ios' ; zip -r -6 ../../materials_ios_${{ github.event.inputs.release_tag }}.zip * -x "*.git*" ".github/*" ".gitignore" ; popd
pushd 'mtrls/android' ; zip -r -6 ../../materials_android_${{ github.event.inputs.release_tag }}.zip * -x "*.git*" ".github/*" ".gitignore" ; popd
chmod +x verifyBackup
./verifyBackup "${{ github.event.inputs.release_tag }}"
- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create \
${{ github.event.inputs.release_tag }} \
materials_windows_${{ github.event.inputs.release_tag }}.zip \
materials_ios_${{ github.event.inputs.release_tag }}.zip \
materials_android_${{ github.event.inputs.release_tag }}.zip \
verifyMaterials_${{ github.event.inputs.release_tag }}.bat \
--title "${{ github.event.inputs.release_tag }}" \
--notes-file "notes.txt" \
--latest