Package World of Warcraft addon #10
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: Package World of Warcraft addon | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Addon version' | |
required: true | |
env: | |
WRATH_VERSION: 30403 | |
jobs: | |
package: | |
name: Create zips and tag | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Get name of addon | |
id: init | |
run: | | |
addon_name=$(ls *.toc) | |
addon_name=$(basename $addon_name .toc) | |
tag_name=${addon_name}-${{github.event.inputs.version}} | |
echo "addon_name=${addon_name}" >> $GITHUB_OUTPUT | |
echo "tag_name=${tag_name}" >> $GITHUB_OUTPUT | |
- name: Make folder for zips | |
run: | | |
mkdir -p .releases/${{steps.init.outputs.addon_name}} | |
rsync -r --exclude={'img/*','README.md'} . .releases/${{steps.init.outputs.addon_name}} | |
- name: Create mainline zip | |
run: | | |
cd .releases | |
zip -9 -r ${{steps.init.outputs.tag_name}}.zip ${{steps.init.outputs.addon_name}} -x *.git* | |
cd .. | |
- name: Tag and Release | |
id: create_release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{steps.init.outputs.tag_name}} | |
name: ${{steps.init.outputs.addon_name}} ${{github.event.inputs.version}} | |
body: ${{steps.init.outputs.addon_name}} ${{github.event.inputs.version}} | |
draft: false | |
prerelease: false | |
files: .releases/${{steps.init.outputs.tag_name}}.zip |