Skip to content

Commit

Permalink
fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Dec 17, 2023
1 parent 4822cc1 commit 7607100
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_shared-docker-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
tagstr="${{ matrix.tag }}"
tagparts=(${tagstr//:/ })
echo "source_tag=${tagparts[0]}" >> $GITHUB_OUTPUT
if [ -z "$tagparts[1]" ]; then
if [ -z "${tagparts[1]}" ]; then
echo "target_tag=${tagparts[0]}" >> $GITHUB_OUTPUT
else
echo "target_tag=${tagparts[1]}" >> $GITHUB_OUTPUT
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ jobs:
needs: [build_binaries]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-depth: 100
ref: ${{ github.sha }}
- name: "Generate release changelog"
id: changelog
run: |
prev_tag=$(git tag --sort=-version:refname | grep -e "^v[0-9.]*$" | head -n 1)
echo "previous release: $prev_tag"
if [ "$prev_tag" ]; then
changelog=$(git log --oneline --no-decorate $prev_tag..HEAD)
else
changelog=$(git log --oneline --no-decorate)
fi
echo $changelog
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A' - }"
changelog=" - ${changelog//$'\r'/'%0D'}"
echo "changelog=$changelog" >> $GITHUB_OUTPUT
# download build artifacts
- name: "Download build artifacts"
uses: actions/download-artifact@v3
Expand All @@ -54,8 +75,8 @@ jobs:
release_name: "v${{ inputs.version }}"
tag_name: "v${{ inputs.version }}"
body: |
### Major Changes
...
### Changes
${{ steps.changelog.outputs.changelog }}
### Release Artifacts
Please read through the [wiki](https://github.com/pk910/dora/wiki) for setup & configuration instructions.
Expand Down

0 comments on commit 7607100

Please sign in to comment.