Skip to content

Commit

Permalink
ci: update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
detj committed Aug 30, 2024
1 parent 6d23d6e commit fb06344
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ on:
- "v*"

jobs:
release-notes:
name: Generate release notes
create-release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -21,7 +19,7 @@ jobs:
fetch-depth: 0
token: ${{ secrets.CHANGELOG_PUSH_TOKEN }}

- name: Generate changelog using git-cliff
- name: Generate changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
Expand All @@ -30,7 +28,7 @@ jobs:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}

- name: Commit the changelog
- name: Commit changelog
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
Expand All @@ -44,17 +42,11 @@ jobs:
id: git-cliff
with:
config: cliff.toml
args: --verbose --github-repo ${{ github.repository }} --current --strip header footer
args: --verbose --github-repo ${{ github.repository }} --current --strip header footer --output "release.md"

- name: Create GitHub release
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRERELEASE: ${{ contains(github.ref_name, '-') }}
run: |
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--draft false \
--prerelease ${{ env.PRERELEASE }} \
--latest false \
--notes "${{ steps.git-cliff.outputs.content }}" \
--verify-tag
gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --draft false --prerelease ${{ env.PRERELEASE }} --latest false --notes-file release.md --verify-tag

0 comments on commit fb06344

Please sign in to comment.