Skip to content
Snippets Groups Projects
Commit 65091b60 authored by Rob Kooper's avatar Rob Kooper
Browse files

auto release create

parent 3793422e
No related branches found
No related tags found
No related merge requests found
name: Create Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get release info
id: release_info
run: |
version="$(awk '/^## / { print tolower($2) }' CHANGELOG.md | head -1)"
changelog="$(sed -e "1,/^## ${version}/d" -e "/^## /,\$d" CHANGELOG.md)"
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo "::set-output name=version::$version"
echo "::set-output name=changelog::$changelog"
- name: create release
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.release_info.outputs.version != 'unreleased'
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release_info.outputs.version }}
release_name: Release ${{ steps.release_info.outputs.version }}
body: ${{ steps.release_info.outputs.changelog }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment