From 983480131bf6ac48b3834d334deb97a6b3f2f4f6 Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 4 Mar 2024 12:54:13 +0900 Subject: chore: Automated release (#13075) * chore: Automated release * follow --- .github/workflows/release-edit-with-push.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release-edit-with-push.yml (limited to '.github/workflows/release-edit-with-push.yml') 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 }}" -- cgit v1.2.3-freya From cf2256cf4162f0f58fea3afbe08d9805451a9efc Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Mon, 27 May 2024 20:11:39 +0900 Subject: fix: CHANGELOG not reflecting correctly (#13888) * fix: CHANGELOG not reflecting correctly * Update .github/workflows/release-edit-with-push.yml Co-authored-by: anatawa12 --------- Co-authored-by: anatawa12 --- .github/workflows/release-edit-with-push.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.github/workflows/release-edit-with-push.yml') diff --git a/.github/workflows/release-edit-with-push.yml b/.github/workflows/release-edit-with-push.yml index 944b98eb7c..890cb047bd 100644 --- a/.github/workflows/release-edit-with-push.yml +++ b/.github/workflows/release-edit-with-push.yml @@ -37,4 +37,7 @@ jobs: # PRのnotesを更新 - name: Update PR run: | - gh pr edit ${{ steps.get_pr.outputs.pr_number }} --body "${{ steps.changelog.outputs.changelog }}" + gh pr edit "$PR_NUMBER" --body "$CHANGELOG" + env: + CHANGELOG: ${{ steps.changelog.outputs.changelog }} + PR_NUMBER: ${{ steps.get_pr.outputs.pr_number }} -- cgit v1.2.3-freya From 1bb1a3298645c2d5a3f678cb6676e19519ec1e48 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 28 May 2024 00:03:12 +0900 Subject: [skip ci] update release manager actions --- .github/workflows/release-edit-with-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/release-edit-with-push.yml') diff --git a/.github/workflows/release-edit-with-push.yml b/.github/workflows/release-edit-with-push.yml index 890cb047bd..86ee0b3fb5 100644 --- a/.github/workflows/release-edit-with-push.yml +++ b/.github/workflows/release-edit-with-push.yml @@ -23,7 +23,7 @@ jobs: # 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 + 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 -- cgit v1.2.3-freya