Skip to content

Commit

Permalink
Add message to automated release generation
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi authored Jul 7, 2023
1 parent 1c4cb43 commit 738d533
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/CD-create_release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Create release file
'on':
workflow_dispatch: null
workflow_dispatch:
inputs:
message:
required: false
default: 'Auto generated release'
jobs:
gradle:
name: Run Gradle
Expand Down Expand Up @@ -28,10 +32,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Creating version number
run: >-
echo "version=v$(grep "version" build.gradle.kts | tail -n 1 | cut -d
"=" -f2 | xargs echo )" >> $GITHUB_OUTPUT
- name: Creating versions
run: |
echo "version=$(grep "version" build.gradle.kts | tail -n 1 | cut -d "=" -f2 | xargs echo )" >> $GITHUB_OUTPUT
echo "tagname=v$(grep "version" build.gradle.kts | tail -n 1 | cut -d "=" -f2 | xargs echo )" >> $GITHUB_OUTPUT
echo "subprojects=$(git diff $(git describe --abbrev=0 --tags) --name-only | grep 'subprojects' | awk -F '/' '{ print $2"/"$3 }' | sort | uniq)" >> $GITHUB_OUTPUT
- name: Creating message
run: |
echo "message=${{ inputs.message }}\n\nModified subprojects:\n${{steps.value.outputs.subprojects}}" >> $GITHUB_OUTPUT
id: value
shell: bash
- run: 'echo "${{steps.value.outputs.version}}"'
Expand All @@ -41,13 +49,12 @@ jobs:
path: jar/
- name: Display structure of downloaded files
run: ls -R
- run: find jar
- run: for i in $(find jar -name "*-all.jar"); do mv $i jar/$(basename ${i%-${{steps.value.outputs.version}}-all.jar}.jar); done
- run: for i in $(find jar -name "*-all.jar"); do mv -v $i jar/$(basename ${i%-${{steps.value.outputs.version}}-all.jar}.jar); done
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1.0
with:
files: jar/**/*.jar
body: "Auto-generated release"
name: ${{steps.value.outputs.version}}
tag_name: ${{steps.value.outputs.version}}
body: ${{steps.value.outputs.message}}
name: ${{steps.value.outputs.tagname}}
tag_name: ${{steps.value.outputs.tagname}}

0 comments on commit 738d533

Please sign in to comment.