Skip to content

fix: use --notes-file to avoid shell interpolation of backticks in re… #12

fix: use --notes-file to avoid shell interpolation of backticks in re…

fix: use --notes-file to avoid shell interpolation of backticks in re… #12

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['[0-9]*.[0-9]*.[0-9]*']
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- run: mvn -B verify
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
awk "/^## \[${GITHUB_REF_NAME}\]/{found=1; next} found && /^## \[/{exit} found{print}" \
CHANGELOG.md > /tmp/release-notes.md
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes-file /tmp/release-notes.md