Skip to content

extract changes for release text body #1

extract changes for release text body

extract changes for release text body #1

Workflow file for this run

name: Create release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-**'
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: build
run: ./mvnw -Drevision=${{github.ref_name}} -Dchangelist="" --batch-mode --update-snapshots package
- name: Extract release changes
id: extract_changes
run: |
TAG=${{ github.ref_name }}
CHANGES="$(perl -nle '($v = "'"$TAG"'") =~ s/^v//; print if /^### $v / ... /^### / and not /^###/' CHANGES.md)"
echo "CHANGES<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.extract_changes.outputs.CHANGES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: add framework package as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/scdh-alea-oxygen-extension-${{ github.ref_name }}-package.zip
asset_name: scdh-alea-oxygen-extension-${{ github.ref_name }}-package.zip
asset_content_type: application/zip