diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..20b8f57 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + tags: + - 'v[0-9]+.[0-9]+' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - uses: nebularg/actions-luacheck@v1 + with: + args: "--no-color -q" + annotate: warning + + - run: ./generate_changelog.sh + + - uses: BigWigsMods/packager@master + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} + WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} + WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} + + - uses: BigWigsMods/packager@master + with: + args: -g classic + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} + WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} + WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} + + - uses: BigWigsMods/packager@master + with: + args: -g bcc + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} + WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} + WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4bd7dd6..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v[0-9]+.[0-9]+' - -env: - CF_API_KEY: ${{ secrets.CF_API_KEY }} - GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} - WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - - run: | - sudo apt-get install luarocks - luarocks install --local luacheck - - - run: /home/runner/.luarocks/bin/luacheck . -q - - - uses: BigWigsMods/packager@master - with: - args: -g classic - - - uses: BigWigsMods/packager@master - with: - args: -g bcc - - - uses: BigWigsMods/packager@master diff --git a/.pkgmeta b/.pkgmeta index f37a77c..d0272a3 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -1,22 +1,26 @@ package-as: BigDebuffs externals: - Libs/LibStub: - url: https://repos.wowace.com/wow/libstub/trunk - tag: 1.0 - Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0 - Libs/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0 - Libs/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0 - Libs/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0 - Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0 - Libs/AceHook-3.0: https://repos.wowace.com/wow/ace3/trunk/AceHook-3.0 - Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0 - Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0 - Libs/AceLocale-3.0: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0 - Libs/LibDualSpec-1.0: https://repos.wowace.com/wow/libdualspec-1-0 - Libs/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk - Libs/LibClassicDurations: https://repos.curseforge.com/wow/libclassicdurations + Libs/LibStub: + url: https://repos.wowace.com/wow/libstub/trunk + tag: 1.0 + Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0 + Libs/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0 + Libs/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0 + Libs/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0 + Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0 + Libs/AceHook-3.0: https://repos.wowace.com/wow/ace3/trunk/AceHook-3.0 + Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0 + Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0 + Libs/AceLocale-3.0: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0 + Libs/LibDualSpec-1.0: https://repos.wowace.com/wow/libdualspec-1-0 + Libs/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk + Libs/LibClassicDurations: https://repos.curseforge.com/wow/libclassicdurations manual-changelog: - filename: README.md - markup-type: markdown + filename: CHANGELOG.md + markup-type: markdown + +ignore: + - README.md + - generate_changelog.sh diff --git a/generate_changelog.sh b/generate_changelog.sh new file mode 100644 index 0000000..9cbfb30 --- /dev/null +++ b/generate_changelog.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +version=$( git describe --tags --always ) +tag=$( git describe --tags --always --abbrev=0 ) + +if [ "$version" = "$tag" ]; then # on a tag + current="$tag" + previous=$( git describe --tags --abbrev=0 HEAD~ ) + if [[ $previous == *beta* ]]; then + if [[ $tag == *beta* ]]; then + previous=$( git describe --tags --abbrev=0 HEAD~ ) + else + previous=$( git describe --tags --abbrev=0 --exclude="*beta*" HEAD~ ) + fi + else + previous=$( git describe --tags --abbrev=0 HEAD~ ) + fi +else + current=$( git log -1 --format="%H" ) + previous="$tag" +fi + +date=$( git log -1 --date=short --format="%ad" ) +url=$( git remote get-url origin | sed -e 's/^git@\(.*\):/https:\/\/\1\//' -e 's/\.git$//' ) + +echo -ne "# [${version}](${url}/tree/${current}) ($date)\n\n[Full Changelog](${url}/compare/${previous}...${current})\n\n" > "CHANGELOG.md" + +if [ "$version" = "$tag" ]; then # on a tag + highlights=$( git cat-file -p "$tag" | sed -e '1,5d' -e '/^-----BEGIN PGP/,/^-----END PGP/d' ) + echo -ne "## Highlights\n\n ${highlights} \n\n## Commits\n\n" >> "CHANGELOG.md" +fi + +git shortlog --no-merges --reverse "$previous..$current" | sed -e '/^\w/G' -e 's/^ /- /' >> "CHANGELOG.md"