From b62bdefee1f3dabe97848a2174835b12b4e640db Mon Sep 17 00:00:00 2001 From: baggiponte <57922983+baggiponte@users.noreply.github.com> Date: Wed, 12 Jul 2023 12:32:41 +0200 Subject: [PATCH] refactor(ci): run taiki-e action to create release --- .../.github/workflows/release-create.yml | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/{{ cookiecutter.__repo_name }}/.github/workflows/release-create.yml b/{{ cookiecutter.__repo_name }}/.github/workflows/release-create.yml index 70ee53b..fc074be 100644 --- a/{{ cookiecutter.__repo_name }}/.github/workflows/release-create.yml +++ b/{{ cookiecutter.__repo_name }}/.github/workflows/release-create.yml @@ -1,9 +1,14 @@ {% raw %} name: Create Release + +permissions: + contents: write + on: push: tags: - "*" + jobs: release-create: runs-on: ubuntu-latest @@ -11,19 +16,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" # access a private repo - - name: Get Release Notes - id: get_release_notes - run: | - awk 'NR>3 && /^## /{exit} {print}' CHANGELOG.md > .release.md - - name: Create Release - uses: actions/create-release@main - env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" # access a private repo + - uses: taiki-e/create-gh-release-action@v1 with: - tag_name: ${{ github.ref }} - release_name: v${{ github.ref }} - body_path: .release.md - draft: false - prerelease: false + changelog: CHANGELOG.md + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # required + branch: main {% endraw %}