-
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (95 loc) · 4.54 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# 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_Classic.lua out/Localization.lua
- name: ✅Luacheck Main Addon
uses: lunarmodules/luacheck@v0
with:
args: out/AdiBags_Classic.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
mv AdiBags_Classic.lua AdiBags_Classical.lua
mv AdiBags_Classic.toc AdiBags_Classical.toc
sed -i 's/Interface\\AddOns\\AdiBags_Classic\\icon/Interface\\AddOns\\AdiBags_Classical\\icon/g' AdiBags_Classical.toc
sed -i 's/AdiBags_Classic.lua/AdiBags_Classical.lua/g' AdiBags_Classical.toc
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