summaryrefslogtreecommitdiff
path: root/.github/workflows/release-edit-with-push.yml
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2024-03-04 12:54:13 +0900
committerGitHub <noreply@github.com>2024-03-04 12:54:13 +0900
commit983480131bf6ac48b3834d334deb97a6b3f2f4f6 (patch)
tree93f5baff0e48b224bbeb9de65e661c07993e33ae /.github/workflows/release-edit-with-push.yml
parenttest(backend): refactor tests (#13499) (diff)
downloadmisskey-983480131bf6ac48b3834d334deb97a6b3f2f4f6.tar.gz
misskey-983480131bf6ac48b3834d334deb97a6b3f2f4f6.tar.bz2
misskey-983480131bf6ac48b3834d334deb97a6b3f2f4f6.zip
chore: Automated release (#13075)
* chore: Automated release * follow
Diffstat (limited to '.github/workflows/release-edit-with-push.yml')
-rw-r--r--.github/workflows/release-edit-with-push.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/release-edit-with-push.yml b/.github/workflows/release-edit-with-push.yml
new file mode 100644
index 0000000000..944b98eb7c
--- /dev/null
+++ b/.github/workflows/release-edit-with-push.yml
@@ -0,0 +1,40 @@
+name: "Release Manager: sync changelog with PR"
+
+on:
+ push:
+ branches:
+ - release/**
+ paths:
+ - 'CHANGELOG.md'
+
+env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+permissions:
+ contents: write
+ issues: write
+ pull-requests: write
+
+jobs:
+ edit:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ # headがrelease/かつopenのPRを1つ取得
+ - name: Get PR
+ run: |
+ echo "pr_number=$(gh pr list --limit 1 --head "${{ github.ref_name }}" --json number --jq '.[] | .number')" >> $GITHUB_OUTPUT
+ id: get_pr
+ - name: Get target version
+ uses: misskey-dev/release-manager-actions/.github/actions/get-target-version@v1
+ id: v
+ # CHANGELOG.mdの内容を取得
+ - name: Get changelog
+ uses: misskey-dev/release-manager-actions/.github/actions/get-changelog@v1
+ with:
+ version: ${{ steps.v.outputs.target_version }}
+ id: changelog
+ # PRのnotesを更新
+ - name: Update PR
+ run: |
+ gh pr edit ${{ steps.get_pr.outputs.pr_number }} --body "${{ steps.changelog.outputs.changelog }}"