Skip to content

TOC bump

TOC bump #9

Workflow file for this run

# description of this workflow, can be anything you want
name: Package and release 📦
# we need to let GitHub know _when_ we want to release, typically only when we create a new tag.
# this will target only tags, and not all pushes to the master branch.
# this part can be heavily customized to your liking, like targeting only tags that match a certain word,
# other branches or even pullrequests.
on:
push:
tags:
- '**'
# a workflow is built up as jobs, and within these jobs are steps
jobs:
# "release" is a job, you can name it anything you want
release:
# we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet
runs-on: ubuntu-latest
# specify the environment variables used by the packager, matching the secrets from the project on GitHub
env:
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow
# "steps" holds a list of all the steps needed to package and release our AddOn
steps:
# we first have to clone the AddOn project, this is a required step
- name: 👱👱Clone project
uses: actions/checkout@v3
with:
fetch-depth: 0 # gets entire git history, needed for automatic changelogs
path: ./variant
- name: 🎭Get Zottelchen/adibags-creator-action
uses: actions/checkout@v3
with:
repository: Zottelchen/adibags-creator-action
ref: refs/heads/v2
persist-credentials: false
path: ./action
- name: 🏹Merge
run: |
cp -r ./variant/* ./action
mkdir ./dist
cp ./variant/.pkgmeta ./dist/.pkgmeta
mv ./action/* .
cp -r ./variant/.git .
rm -rf ./action ./variant
ls -la .
- name: 📷Build AdiBags Extension
uses: ./
env:
PYTHONUNBUFFERED: 1
BLIZZARD_API_ID: ${{ secrets.BLIZZ_ID }}
BLIZZARD_API_SECRET: ${{ secrets.BLIZZ_SECRET }}
GITHUB_GIST_TOKEN: ${{ secrets.GIST_TOKEN }}
APPRISE_ADDON_LOCALE: ${{ secrets.APPRISE_ADDON_LOCALE }}
APPRISE_ITEM_CACHE: ${{ secrets.APPRISE_ITEM_CACHE }}
- name: 😎Stylua
uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
# CLI arguments
args: --verify --indent-type spaces --indent-width 2 --line-endings Windows --quote-style AutoPreferDouble out/AdiBags_BattleForAzeroth.lua out/Localization.lua
- name: ✅Luacheck Main Addon
uses: lunarmodules/luacheck@v0
with:
args: out/AdiBags_BattleForAzeroth.lua --ignore 113 211 212 611 614 631
# ignored (see https://luacheck.readthedocs.io/en/stable/warnings.html):
# 113: Accessing an undefined global variable. - There are bound to be some as this an addon, as there are some functions which are known to WoW only.
# 211: Unused local variable. - Not important.
# 212: Unused argument. - Not important.
# 611: A line consists of nothing but whitespace. - Oh no! Oh wait, not important.
# 614: Trailing whitespace in a comment. - These reports are just plain wrong.
# 631: Line is too long. - Not important.
- name: ☑️Luacheck Localization
uses: lunarmodules/luacheck@v0
with:
args: out/Localization.lua --ignore 113 211 212 542 611 614 631
# additionally ignored:
# 542: empty if branch - This is expected, since Bigwigs will replace the empty branch AFTER this check runs.
- name: 📝Copy Output
run: |
cp -r ./out/* ./dist
cp -r ./out/.git ./dist
ls -la ./dist
cd ./dist
git add *
# once cloned, we just run the GitHub Action for the packager project
- name: 📦Package and release
uses: BigWigsMods/packager@v2
with:
args: -t dist