Skip to content

write to file instead #6

write to file instead

write to file instead #6

Workflow file for this run

permissions:
contents: write
on:
push:
branchs:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: get version and changes
run: |
inside_section=false
changelog_lines=""
while IFS= read -r line; do
if [[ $line == "==="* ]]; then
if [ "$inside_section" = false ]; then
inside_section=true
else
break # Exit the loop
fi
fi
if [ "$inside_section" = true ] && [[ $line == "- "* ]]; then
changelog_lines="$changelog_lines$line"$'\n'
fi
done < changelog.txt
echo "$changelog_lines" > latest.txt
echo "version=$(cat module.json | jq -r .version)" >> $GITHUB_ENV
- uses: softprops/action-gh-release@v1
with:
body_path: latest.txt
tag_name: v${{ env.version }}
files: module.json