Skip to content

Commit

Permalink
bugfix release logic
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Sep 11, 2023
1 parent 183fb21 commit 4333751
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
outputs:
RELEASE_BRANCH_NAME_PREFIX: ${{ steps.set_context.outputs.RELEASE_BRANCH_NAME }}
RELEASE_TAG: ${{ steps.upgrade_semver.outputs.RELEASE_TAG }}
RELEASE: ${{ steps.upgrade_semver.outputs.RELEASE }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -83,18 +84,21 @@ jobs:
exit 1
fi
echo "RELEASE=true" >> $GITHUB_OUTPUT
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_OUTPUT # e.g) vx.x.x
echo "${RELEASE_TAG}"
release:
needs:
- detect-ci-container
- semver-auto
runs-on: ubuntu-latest
if: ${{ needs.semver-auto.outputs.RELEASE == 'true' }}
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG_NAME }}
env:
RELEASE_BRANCH_NAME: release/${{ steps.semver-auto.outputs.RELEASE_BRANCH_NAME_PREFIX }}
RELEASE_BRANCH_NAME: release/${{ needs.semver-auto.outputs.RELEASE_BRANCH_NAME_PREFIX }}
RELEASE_TAG: ${{ needs.semver-auto.outputs.RELEASE_TAG }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -157,20 +161,18 @@ jobs:
git push origin ${RELEASE_BRANCH_NAME}
git push origin ${RELEASE_TAG}
echo "RELEASE=true" >> $GITHUB_OUTPUT
echo "VERSION=${RELEASE_TAG}" >> $GITHUB_OUTPUT
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}

- name: Create release
if: steps.update_for_new_release.outputs.RELEASE == 'true'
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
with:
tag_name: ${{ steps.update_for_new_release.outputs.VERSION }}
release_name: Release ${{ steps.update_for_new_release.outputs.VERSION }}
name: Release ${{ steps.update_for_new_release.outputs.VERSION }}
body: |
See [CHANGELOG.md](https://github.com/vdaas/vald/blob/${{ steps.update_for_new_release.outputs.VERSION }}/CHANGELOG.md) for details.
draft: false
Expand Down

0 comments on commit 4333751

Please sign in to comment.