Skip to content

Commit

Permalink
feat: add release note workflow v0.3.15 (#327)
Browse files Browse the repository at this point in the history
* ci: dispatch release note repository (#313)

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* ci(dispatch-release-note): use Github Apps instead of GIHUB_TOKEN (#315)

* ci(dispatch-release-note): use Github Apps instead of GIHUB_TOKEN

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* fix typo

* chore: remove white space

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

---------

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

---------

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
  • Loading branch information
shmpwk and kenji-miyake authored Mar 17, 2023
1 parent 8d49017 commit da26100
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/dispatch-release-note.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: dispatch-release-note
on:
push:
branches:
- beta/v*
- tier4/main
tags:
- v*
workflow_dispatch:
inputs:
beta-branch-or-tag-name:
description: The name of the beta branch or tag to write release note
type: string
required: true
jobs:
dispatch-release-note:
runs-on: ubuntu-latest
name: release-repository-dispatch
steps:
- name: Set tag name
id: set-tag-name
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}"
else
REF_NAME="${{ github.ref_name }}"
fi
echo ::set-output name=ref-name::"$REF_NAME"
echo ::set-output name=tag-name::"${REF_NAME#beta/}"
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Repository dispatch for release note
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \
-d '{"event_type":"${{ steps.set-tag-name.outputs.ref-name }}"}'

0 comments on commit da26100

Please sign in to comment.