Skip to content

Package World of Warcraft addon #10

Package World of Warcraft addon

Package World of Warcraft addon #10

Workflow file for this run

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