tide/.github/workflows/release.yml
2021-03-04 12:49:56 -08:00

36 lines
810 B
YAML

---
name: release
on:
push:
tags:
- v*.*.*
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Remove first five lines
# Print until we hit a ## header
# Remove last two lines
# Replace [#79][] with #79
# Output to /tmp/github_release.md
- name: Generate release notes
run: >
tail --lines=+5 $GITHUB_WORKSPACE/CHANGELOG.md |
sed '/^## /q' |
head --lines=-2 |
sed -E 's/\[(#[0-9]*)\]\[\]/\1/g'
>/tmp/github_release.md
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: /tmp/github_release.md