Skip to content

Commit

Permalink
ci(github-release): set target name (tier4#213)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake committed Apr 21, 2022
1 parent 6005434 commit 6152d2a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,28 @@ jobs:
fetch-depth: 0
ref: ${{ steps.set-tag-name.outputs.ref-name }}

- name: Create a temporary local tag for beta branches
- name: Set target name for beta branches
id: set-target-name
run: |
if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then
echo ::set-output name=target-name::"${{ steps.set-tag-name.outputs.ref-name }}"
fi
- name: Create a local tag for beta branches
run: |
if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then
git tag "${{ steps.set-tag-name.outputs.tag-name }}"
fi
- name: Run generate-changelog
id: generate-changelog
uses: autowarefoundation/autoware-github-actions/generate-changelog@v1

- name: Remove the temporary local tag for beta branches
run: |
if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then
git tag -d "${{ steps.set-tag-name.outputs.tag-name }}"
fi
- name: Release to GitHub
run: |
gh release create "${{ steps.set-tag-name.outputs.tag-name }}" \
--draft \
--target "${{ steps.set-target-name.outputs.target-name }}" \
--title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \
--notes "$NOTES"
env:
Expand Down

0 comments on commit 6152d2a

Please sign in to comment.