Skip to content

Publish Release

Publish Release #1

Workflow file for this run

---
# This workflow publishes a release when a new tag is created
name: Publish Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Get release notes from CHANGELOG
id: changelog
run: |
VERSION=${{ github.ref }}
NOTES=$(awk '/^## $VERSION/{flag=1;next}/^## /{flag=0}flag' CHANGELOG.md)
echo "::set-output name=notes::$NOTES"
- name: Publish Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog.outputs.notes }}
draft: false
prerelease: false