GitHub Action - Release¶
Source: r.pkg.template/release.yaml at main ยท insightsengineering/r.pkg.template (github.com)
---
name: Release ๐
on:
push:
tags:
- "v*"
workflow_call:
jobs:
release:
name: Release ๐
runs-on: ubuntu-latest
if: "! contains(github.event.commits[0].message, '[skip release]')"
permissions:
contents: write
steps:
- name: Checkout repo ๐
uses: actions/checkout@v2
- name: Generate Changelog ๐
run: |
RELEASE_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION)
REPOSITORY_NAME="${{ github.event.repository.name }}"
(awk "/^#+.*${REPOSITORY_NAME//./\.}.*${RELEASE_VERSION//./\.}$/{flag=1;next}/^#+.*${REPOSITORY_NAME//./\.}.*/{flag=0}flag" NEWS.md | grep -v "^$" || echo "* ${RELEASE_VERSION}") > RELEASE_BODY.txt
- name: Create release ๐
uses: softprops/action-gh-release@v1
with:
body_path: RELEASE_BODY.txt
token: ${{ secrets.GITHUB_TOKEN }}
Appendix: Links¶
Backlinks:
list from [[GitHub Action - Release]] AND -"Changelog"