124 lines
5.6 KiB
YAML
124 lines
5.6 KiB
YAML
name: Release Manual
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'AddOn Version'
|
|
required: true
|
|
default: '1.5.0'
|
|
type: string
|
|
update_release:
|
|
description: 'Update Release'
|
|
required: true
|
|
default: true
|
|
type: boolean
|
|
vanilla_data:
|
|
description: 'Vanilla Data Version'
|
|
required: true
|
|
default: '1.0'
|
|
type: string
|
|
vanilla_data_extra:
|
|
description: 'Vanilla Extra Data Version'
|
|
required: true
|
|
default: '1.0'
|
|
type: string
|
|
tbc_data:
|
|
description: 'TBC Data Version'
|
|
required: true
|
|
default: '1.0'
|
|
type: string
|
|
wotlk_data:
|
|
description: 'WotLK Data Version'
|
|
required: true
|
|
default: '1.0'
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Replace Version placeholders
|
|
run: |
|
|
VERSION=${{ inputs.tag }}
|
|
VERSION_VANILLA=${{ inputs.vanilla_data }}
|
|
VERSION_VANILLA_EXTRA=${{ inputs.vanilla_data_extra }}
|
|
VERSION_TBC=${{ inputs.tbc_data }}
|
|
VERSION_WOTLK=${{ inputs.wotlk_data }}
|
|
find ./AI_VoiceOver -name "*.toc" -exec sed -i "s/## Version: 0.0.0/## Version: $VERSION/g" {} \;
|
|
find ./AI_VoiceOverData_Vanilla -name "*.toc" -exec sed -i "s/## Version: 0.0/## Version: $VERSION_VANILLA/g" {} \;
|
|
find ./AI_VoiceOverData_VanillaExtra -name "*.toc" -exec sed -i "s/## Version: 0.0/## Version: $VERSION_VANILLA_EXTRA/g" {} \;
|
|
find ./AI_VoiceOverData_TBC -name "*.toc" -exec sed -i "s/## Version: 0.0/## Version: $VERSION_TBC/g" {} \;
|
|
find ./AI_VoiceOverData_WoTLK -name "*.toc" -exec sed -i "s/## Version: 0.0/## Version: $VERSION_WOTLK/g" {} \;
|
|
|
|
- name: Copy AI_VoiceOver to release
|
|
run: |
|
|
mkdir -p ./release/vanilla/AI_VoiceOver
|
|
mkdir -p ./release/tbc/AI_VoiceOver
|
|
mkdir -p ./release/wrath/AI_VoiceOver
|
|
mkdir -p ./release/blizz/AI_VoiceOver
|
|
mkdir -p ./modules/AI_VoiceOverData_Vanilla
|
|
mkdir -p ./modules/AI_VoiceOverData_VanillaExtra
|
|
mkdir -p ./modules/AI_VoiceOverData_TBC
|
|
mkdir -p ./modules/AI_VoiceOverData_WoTLK
|
|
cp -r ./AI_VoiceOver/* ./release/vanilla/AI_VoiceOver
|
|
cp -r ./AI_VoiceOver/* ./release/tbc/AI_VoiceOver
|
|
cp -r ./AI_VoiceOver/* ./release/wrath/AI_VoiceOver
|
|
cp -r ./AI_VoiceOver/* ./release/blizz/AI_VoiceOver
|
|
cp -r ./AI_VoiceOverData_Vanilla/* ./modules/AI_VoiceOverData_Vanilla
|
|
cp -r ./AI_VoiceOverData_VanillaExtra/* ./modules/AI_VoiceOverData_VanillaExtra
|
|
cp -r ./AI_VoiceOverData_TBC/* ./modules/AI_VoiceOverData_TBC
|
|
cp -r ./AI_VoiceOverData_WoTLK/* ./modules/AI_VoiceOverData_WoTLK
|
|
|
|
- name: Replace Interface versions
|
|
run: |
|
|
find ./modules/AI_VoiceOverData_Vanilla -name "*.toc" -exec sed -i "s/## Interface: 00000/## Interface: 11200/g" {} \;
|
|
find ./modules/AI_VoiceOverData_VanillaExtra -name "*.toc" -exec sed -i "s/## Interface: 00000/## Interface: 11200/g" {} \;
|
|
find ./modules/AI_VoiceOverData_TBC -name "*.toc" -exec sed -i "s/## Interface: 00000/## Interface: 20400/g" {} \;
|
|
find ./modules/AI_VoiceOverData_WoTLK -name "*.toc" -exec sed -i "s/## Interface: 00000/## Interface: 30300/g" {} \;
|
|
|
|
- name: Copy TOC files
|
|
run: |
|
|
cp ./release/vanilla/AI_VoiceOver/AI_VoiceOver_1.12.toc ./release/vanilla/AI_VoiceOver/AI_VoiceOver.toc
|
|
cp ./release/tbc/AI_VoiceOver/AI_VoiceOver_2.4.3.toc ./release/tbc/AI_VoiceOver/AI_VoiceOver.toc
|
|
cp ./release/wrath/AI_VoiceOver/AI_VoiceOver_3.3.5.toc ./release/wrath/AI_VoiceOver/AI_VoiceOver.toc
|
|
|
|
- name: Zip each release version
|
|
run: |
|
|
VERSION=${{ inputs.tag }}
|
|
cd ./release/vanilla && zip -r ../AI_VoiceOver-WoW_1.12.zip . && cd ../..
|
|
cd ./release/tbc && zip -r ../AI_VoiceOver-WoW_2.4.3.zip . && cd ../..
|
|
cd ./release/wrath && zip -r ../AI_VoiceOver-WoW_3.3.5.zip . && cd ../..
|
|
cd ./release/blizz && zip -r ../AI_VoiceOver-WoW_BlizzClassic.zip . && cd ../..
|
|
|
|
- name: Generate release notes
|
|
uses: cuchi/jinja2-action@v1.3.0
|
|
with:
|
|
template: .github/release-template.md
|
|
output_file: release_notes.md
|
|
strict: true
|
|
variables: |
|
|
github_zip_download_vanilla_sounds=https://github.com/mrthinger/wow-voiceover/releases/download/v1.3.1/AI_VoiceOverData_Vanilla-v1.0.0.zip
|
|
github_zip_download_blizz=https://github.com/mrthinger/wow-voiceover/releases/download/${{ inputs.tag }}/AI_VoiceOver-WoW_BlizzClassic.zip
|
|
github_zip_download_112=https://github.com/mrthinger/wow-voiceover/releases/download/${{ inputs.tag }}/AI_VoiceOver-WoW_1.12.zip
|
|
github_zip_download_243=https://github.com/mrthinger/wow-voiceover/releases/download/${{ inputs.tag }}/AI_VoiceOver-WoW_2.4.3.zip
|
|
github_zip_download_335=https://github.com/mrthinger/wow-voiceover/releases/download/${{ inputs.tag }}/AI_VoiceOver-WoW_3.3.5.zip
|
|
curse_link_blizz=https://www.curseforge.com/wow/addons/voiceover-tbc-wotlk
|
|
curse_link_vanilla_sounds=https://www.curseforge.com/wow/addons/voiceover-sounds-vanilla
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: true
|
|
preserve_order: true
|
|
body_path: release_notes.md
|
|
tag_name: ${{ inputs.tag }}
|
|
files: |
|
|
release/*.zip
|