Merge pull request #2 from uplime/devel

Properly track release details
This commit is contained in:
Nicholas Chambers 2021-07-03 18:46:08 -05:00 committed by GitHub
commit f167634edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,8 @@ name: Release Builder
on: on:
push: push:
tags: [ v1.* ] tags:
- v[0-9.]+
jobs: jobs:
build: build:
@ -18,4 +19,4 @@ jobs:
- name: Upload release package - name: Upload release package
run: | run: |
export GITHUB_TOKEN=$ROWBOT_RELEASE_TOKEN export GITHUB_TOKEN=$ROWBOT_RELEASE_TOKEN
hub release create -a "$RUNNER_TEMP"/rowbot-"${GITHUB_REF##*/}".tar.gz -F release.txt "${GITHUB_REF##*/}" hub release create -a "$RUNNER_TEMP"/rowbot-"${GITHUB_REF##*/}".tar.gz -m "$(awk -F= '$1 == "#RELEASE_NAME" { print $2 }' rowbot)" -m "$(awk -F= '$1 == "#RELEASE_DESC" { print $2 }' rowbot)" "${GITHUB_REF##*/}"

18
rowbot
View File

@ -4,7 +4,11 @@
# lore # lore
### ###
export LORE_THIS_RELOAD #RELEASE_CODE=Bender
#RELEASE_VER=1.0
#RELEASE_NAME="Bender (Rowbot v1.0)"
#RELEASE_DESC="A smol bot for remembering things"
printf -v LORE_THIS_RELOAD '%(%s)T' -1 printf -v LORE_THIS_RELOAD '%(%s)T' -1
if [[ ! -v LORE_START_TIME ]]; then if [[ ! -v LORE_START_TIME ]]; then
@ -1057,19 +1061,19 @@ hook_cmd_control_panel() {
privmsg "$to" "sent message to $recipient" privmsg "$to" "sent message to $recipient"
;; ;;
dashboard|lore) dashboard|lore)
privmsg "$to" "legend began on $(printf '%(%c)T' "$LORE_START_TIME")" privmsg "$to" "Legend began on $(printf '%(%c)T' "$LORE_START_TIME")"
privmsg "$to" "this life began on $(printf '%(%c)T' "$LORE_THIS_RELOAD")" privmsg "$to" "This life began on $(printf '%(%c)T' "$LORE_THIS_RELOAD")"
if (( LORE_LONGEST_LIFE > SECONDS )); then if (( LORE_LONGEST_LIFE > SECONDS )); then
privmsg "$to" "longest life so far was $(seconds "$LORE_LONGEST_LIFE")" privmsg "$to" "Longest life so far was $(seconds "$LORE_LONGEST_LIFE")"
else else
privmsg "$to" "longest life so far is $(seconds "$SECONDS") (this one)" privmsg "$to" "Longest life so far is $(seconds "$SECONDS") (this one)"
fi fi
if (( LORE_LIVES > 1 )); then if (( LORE_LIVES > 1 )); then
privmsg "$to" "lived $LORE_LIVES times" privmsg "$to" "Lived $LORE_LIVES times"
else else
privmsg "$to" "lived $LORE_LIVES time" privmsg "$to" "Lived $LORE_LIVES time"
fi fi
esac esac
} }