Skip to content

Commit

Permalink
use generate_changelog.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jordonwow committed May 15, 2021
1 parent 79fb75e commit c2012d5
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 50 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 }}
33 changes: 0 additions & 33 deletions .github/workflows/release.yml

This file was deleted.

38 changes: 21 additions & 17 deletions .pkgmeta
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions generate_changelog.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit c2012d5

Please sign in to comment.