Skip to content

chore: modify changelog #14

chore: modify changelog

chore: modify changelog #14

name: Release Drafter
on:
pull_request:
types:
- closed
branches:
- main
permissions:
contents: read
jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
# Drafts your next Release notes as Pull Requests are merged into "master"
# - uses: release-drafter/release-drafter@v6
# # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: release-drafter-config.yml
# # disable-autolabeler: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: 4.5.10
path: ./CHANGELOG.md
- name: Create/update release
uses: ncipollo/release-action@v1
with:
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
tag: ${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}