mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
update auto_release workflow
This commit is contained in:
parent
dc6eb3ac61
commit
d50e19db40
13
.github/workflows/auto_release.yml
vendored
13
.github/workflows/auto_release.yml
vendored
|
@ -69,6 +69,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Get Commit Messages
|
- name: Get Commit Messages
|
||||||
|
id: get_messages
|
||||||
run: |
|
run: |
|
||||||
MESSAGES=""
|
MESSAGES=""
|
||||||
if [[ "$LAST_TAG" == "0" ]]; then
|
if [[ "$LAST_TAG" == "0" ]]; then
|
||||||
|
@ -81,15 +82,12 @@ jobs:
|
||||||
for commit in $(git log --pretty=format:'%H' $COMMIT_RANGE); do
|
for commit in $(git log --pretty=format:'%H' $COMMIT_RANGE); do
|
||||||
if git diff-tree --no-commit-id --name-only -r $commit | grep "^$FOLDER_CHANGED/"; then
|
if git diff-tree --no-commit-id --name-only -r $commit | grep "^$FOLDER_CHANGED/"; then
|
||||||
MESSAGE=$(git log --format=%B -n 1 $commit)
|
MESSAGE=$(git log --format=%B -n 1 $commit)
|
||||||
MESSAGES="$MESSAGES- $commit: $MESSAGE\n"
|
MESSAGES="$MESSAGES- $commit: $MESSAGE"$'\n'
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
MESSAGES="Seafile version: $SEAFILE_VERSION\nImage build version: $NEXT_BUILD\nChangelog:\n$MESSAGES"
|
MESSAGES="Seafile version: $SEAFILE_VERSION"$'\n'"Image build version: $NEXT_BUILD"$'\n'"Changelog:"$'\n'"$MESSAGES"
|
||||||
|
echo "::set-output name=formatted_messages::$MESSAGES"
|
||||||
echo "MESSAGES<<EOF" >> $GITHUB_ENV
|
|
||||||
echo "$MESSAGES" >> $GITHUB_ENV
|
|
||||||
echo "EOF" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: env.FOLDER_CHANGED != '' && env.SEAFILE_VERSION != ''
|
if: env.FOLDER_CHANGED != '' && env.SEAFILE_VERSION != ''
|
||||||
|
@ -99,6 +97,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.FOLDER_CHANGED }}-${{ env.SEAFILE_VERSION }}_${{ env.NEXT_BUILD }}
|
tag_name: ${{ env.FOLDER_CHANGED }}-${{ env.SEAFILE_VERSION }}_${{ env.NEXT_BUILD }}
|
||||||
release_name: ${{ env.FOLDER_CHANGED }}-${{ env.SEAFILE_VERSION }}_${{ env.NEXT_BUILD }}
|
release_name: ${{ env.FOLDER_CHANGED }}-${{ env.SEAFILE_VERSION }}_${{ env.NEXT_BUILD }}
|
||||||
body: ${{ env.MESSAGES }}
|
body: ${{ steps.get_messages.outputs.formatted_messages }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue