Skip to content

Commit

Permalink
Bump goreleaser. Added release header and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontes11 committed Dec 28, 2023
1 parent d7edd00 commit 5dacd79
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,30 @@ jobs:
- name: Fetch tags
run: git fetch --force --tags

- name: Prepare
id: prep
run: |
VERSION=sha-${GITHUB_SHA::8}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF/refs\/tags\//}
fi
RELEASE_ARGS=release
RELEASE_HEADER_TMPL=docs/releases/RELEASE_${VERSION}_HEADER.md.gotmpl
RELEASE_FOOTER_TMPL=docs/releases/RELEASE_${VERSION}_FOOTER.md.gotmpl
if [ -f "${RELEASE_HEADER_TMPL}" ]; then
RELEASE_ARGS="${RELEASE_ARGS} --release-header-tmpl=${RELEASE_HEADER_TMPL}"
fi
if [ -f "${RELEASE_FOOTER_TMPL}" ]; then
RELEASE_ARGS="${RELEASE_ARGS} --release-footer-tmpl=${RELEASE_FOOTER_TMPL}"
fi
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "RELEASE_ARGS=${RELEASE_ARGS}" >> $GITHUB_OUTPUT
- name: GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release
args: ${{ steps.prep.outputs.RELEASE_ARGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions docs/releases/RELEASE_v0.0.12_FOOTER.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .ProjectName }}📜 is licensed under [MIT](https://opensource.org/license/mit/).
1 change: 1 addition & 0 deletions docs/releases/RELEASE_v0.0.12_HEADER.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thank you for using {{ .ProjectName }}📜! This release contains multiple improvements and bugfixes.

0 comments on commit 5dacd79

Please sign in to comment.