diff --git a/.github/workflows/create-target.yml b/.github/workflows/create-target.yml index a660981..8c6db9a 100644 --- a/.github/workflows/create-target.yml +++ b/.github/workflows/create-target.yml @@ -70,12 +70,12 @@ jobs: - name: Get changelog uses: ./.github/actions/get-changelog with: - version: 202x.x.x (Unreleased) + version: Unreleased id: changelog # CHANGELOG.mdのバージョンの書き換え - name: Modify CHANGELOG.md run: | - sed -i 's/## 202x.x.x (Unreleased)/## ${{ steps.target_version.outputs.result }}/' CHANGELOG.md + sed -i 's/## Unreleased/## ${{ steps.target_version.outputs.result }}/' CHANGELOG.md # release/ブランチとタグを作成 - name: Commit version run: | diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d1a40da..8d12d41 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -15,6 +15,13 @@ on: type: string description: 'package.jsons to rewrite (json)' default: 'package.json' + changes_template: + type: string + description: 'Template for CHANGELOG.md' + default: | + ## Unreleased + - + secrets: RULESET_EDIT_APP_ID: description: 'App ID for app to edit rulesets' @@ -191,18 +198,7 @@ jobs: ref: ${{ steps.declear-base-branch.outputs.base_branch }} - name: Prepend CHANGELOG template env: - CHANGES_TEMPLATE: | - ## 202x.x.x (Unreleased) - - ### General - - - - ### Client - - - - ### Server - - - + CHANGES_TEMPLATE: ${{ inputs.changes_template }} run: sed -i "1i $(echo "${CHANGES_TEMPLATE}" | sed -r 's/$/\\n/' | while IFS= read -r line; do echo -n "$line"; done)" CHANGELOG.md - name: Update CHANGELOG.md (prepend template) run: | diff --git a/.github/workflows/release-with-dispatch.yml b/.github/workflows/release-with-dispatch.yml index e61ff89..4018d3b 100644 --- a/.github/workflows/release-with-dispatch.yml +++ b/.github/workflows/release-with-dispatch.yml @@ -47,6 +47,20 @@ jobs: pr_number: ${{ needs.get-pr.outputs.pr_number }} user: LuckyBeast package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }} + # Text to prepend to the changelog + # The first line must be `## Unreleased` + changes_template: | + ## Unreleased + + ### General + - + + ### Client + - + + ### Server + - + secrets: RULESET_EDIT_APP_ID: ${{ secrets.RULESET_EDIT_APP_ID }} RULESET_EDIT_APP_PRIVATE_KEY: ${{ secrets.RULESET_EDIT_APP_PRIVATE_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 904ef3e..7e9f16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 202x.x.x (Unreleased) +## Unreleased ### General -