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 %}