tide/.github/workflows/release.yml
2021-10-31 11:16:17 -07:00

39 lines
916 B
YAML

---
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create higher level tags
uses: vweevers/additional-tags-action@v1
# 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