[fix] Greatly reduce memory usage #418
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: build | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
lua-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: Install Lua | |
uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.1" | |
- name: Install and run Luacheck | |
uses: nebularg/actions-luacheck@v1 | |
with: | |
files: . | |
args: "--no-color -q" | |
unit-tests: | |
needs: lua-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Lua | |
uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.1" | |
- name: Install Luarocks | |
uses: leafo/gh-actions-luarocks@v4 | |
- name: Run Unit Tests | |
run: | | |
luarocks install busted | |
busted -p ".test.lua" . | |
publish: | |
needs: unit-tests | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
- name: Fetch tags | |
run: git fetch --prune --unshallow --tags | |
- name: Generate Changelog | |
id: changelog | |
run: python changelog.py >> CHANGELOG.md | |
- name: Build ZIP | |
run: python build.py -r | |
- name: Create GitHub release | |
run: > | |
gh release create ${{github.ref_name}} | |
--verify-tag | |
-F CHANGELOG.md | |
releases/${{github.ref_name}}/ExtendedCharacterStats-${{github.ref_name}}.zip | |
releases/${{github.ref_name}}/release.json | |
- name: Upload CurseForge | |
run: sh upload-cf.sh ${{github.ref_name}} | |
- name: Upload WAGO | |
run: sh upload-wago.sh ${{github.ref_name}} |