diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eaf86527..ae54dbf9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,71 +19,23 @@ jobs: - name: "Determine release tag" run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV" - - name: "Determine release body" - uses: "actions/github-script@v5" - with: - github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" - script: | - const repository = context.repo; - - const response = await github.rest.repos.generateReleaseNotes({ - owner: repository.owner, - repo: repository.repo, - tag_name: "${{ env.RELEASE_TAG }}", - }); - - core.exportVariable("RELEASE_BODY", response.data.body); - - - name: "Escape release body" - run: | - RELEASE_BODY="${RELEASE_BODY//'%'/'%25'}" - RELEASE_BODY="${RELEASE_BODY//$'\n'/'%0A'}" - RELEASE_BODY="${RELEASE_BODY//$'\r'/'%0D'}" - - echo RELEASE_BODY="${RELEASE_BODY}" >> $GITHUB_ENV - env: - RELEASE_BODY: | - ## What's Changed - - * composer(deps-dev): bump vimeo/psalm from 4.17.0 to 4.18 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/624 - * github-actions(deps): bump stefanzweifel/git-auto-commit-action from 4.12.0 to 4.13.0 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/625 - * composer(deps-dev): bump vimeo/psalm from 4.18 to 4.18.1 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/626 - * composer(deps-dev): bump infection/infection from 0.25.5 to 0.26.0 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/627 - * composer(deps-dev): bump infection/infection from 0.26.0 to 0.26.1 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/628 - * github-actions(deps): bump stefanzweifel/git-auto-commit-action from 4.13.0 to 4.13.1 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/629 - * composer(deps-dev): bump ergebnis/php-cs-fixer-config from 3.4.0 to 4.0.0 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/630 - * composer(deps-dev): bump infection/infection from 0.26.1 to 0.26.2 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/631 - * Fix: Links to documentation by @localheinz in https://github.com/ergebnis/json-normalizer/pull/633 - * Enhancement: Add links to documentation by @localheinz in https://github.com/ergebnis/json-normalizer/pull/634 - * Fix: Update fixture by @localheinz in https://github.com/ergebnis/json-normalizer/pull/635 - * Fix: Indentation by @localheinz in https://github.com/ergebnis/json-normalizer/pull/636 - * Enhancement: Add fixture by @localheinz in https://github.com/ergebnis/json-normalizer/pull/637 - * Fix: Remove unnecessary condition by @localheinz in https://github.com/ergebnis/json-normalizer/pull/632 - * Fix: Rename variable by @localheinz in https://github.com/ergebnis/json-normalizer/pull/638 - * Enhancement: Normalize additional properties by @localheinz in https://github.com/ergebnis/json-normalizer/pull/639 - * Enhancement: Adjust fixtures by @localheinz in https://github.com/ergebnis/json-normalizer/pull/640 - * Enhancement: Normalize array values without schema definition by @localheinz in https://github.com/ergebnis/json-normalizer/pull/641 - * composer(deps-dev): bump phpunit/phpunit from 9.5.11 to 9.5.12 by @dependabot in https://github.com/ergebnis/json-normalizer/pull/642 - * Enhancement: Automatically generate release body by @localheinz in https://github.com/ergebnis/json-normalizer/pull/643 - * Fix: Update `CHANGELOG.md` by @localheinz in https://github.com/ergebnis/json-normalizer/pull/644 - - **Full Changelog**: https://github.com/ergebnis/json-normalizer/compare/2.1.0...2.2.0 - - name: "Create release" uses: "actions/github-script@v5" env: - RELEASE_TAG: "0.7.26" + RELEASE_TAG: "0.7.27" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" script: | const repository = context.repo; - await github.rest.repos.createRelease({ - body: "${{ env.RELEASE_BODY }}", + response = await github.rest.repos.createRelease({ draft: false, + generate_release_notes: true, name: "${{ env.RELEASE_TAG }}", owner: repository.owner, prerelease: false, repo: repository.repo, tag_name: "${{ env.RELEASE_TAG }}", }); + + console.log(response)