Skip to content

Commit

Permalink
Update packaging workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisSpomer committed Oct 20, 2022
1 parent b58da4a commit 20de1ae
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/package-addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ on:
required: true

env:
CLASSIC_VERSION: 11402
BURNING_CRUSADE_VERSION: 20503
CLASSIC_VERSION: 11403
BURNING_CRUSADE_VERSION: 20504
WRATH_VERSION: 30400

jobs:
package:
name: Create zips and tag
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get name of addon
id: init
Expand All @@ -33,7 +34,7 @@ jobs:
mkdir -p .releases/${{steps.init.outputs.addon_name}}
rsync -r --exclude '.*' . .releases/${{steps.init.outputs.addon_name}}
- name: Create retail zip
- name: Create mainline zip
run: |
cd .releases
zip -9 -r ${{steps.init.outputs.tag_name}}.zip ${{steps.init.outputs.addon_name}}
Expand All @@ -59,6 +60,16 @@ jobs:
zip -9 -r ${{steps.init.outputs.tag_name}}-BurningCrusade.zip ${{steps.init.outputs.addon_name}}
cd ..
- name: Replace TOC version for Wrath
run: |
sed -i 's/Interface: *[0-9]\+/Interface: ${{env.WRATH_VERSION}}/g' .releases/${{steps.init.outputs.addon_name}}/${{steps.init.outputs.addon_name}}.toc
- name: Create Wrath zip
run: |
cd .releases
zip -9 -r ${{steps.init.outputs.tag_name}}-Wrath.zip ${{steps.init.outputs.addon_name}}
cd ..
- name: Tag this version
id: create_release
uses: actions/create-release@v1
Expand All @@ -71,7 +82,7 @@ jobs:
draft: false
prerelease: false

- name: Add retail zip to release
- name: Add mainline zip to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -100,3 +111,13 @@ jobs:
asset_path: .releases/${{steps.init.outputs.tag_name}}-BurningCrusade.zip
asset_name: ${{steps.init.outputs.tag_name}}-BurningCrusade.zip
asset_content_type: application/zip

- name: Add Wrath zip to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .releases/${{steps.init.outputs.tag_name}}-Wrath.zip
asset_name: ${{steps.init.outputs.tag_name}}-Wrath.zip
asset_content_type: application/zip

0 comments on commit 20de1ae

Please sign in to comment.