mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-13 00:04:47 +07:00
a58e0b7507
* ci(generate-changelogs): control whether to write to issue page * fix: fix syntax
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Generate Changelogs
|
|
run-name: 'chore(release): generate changelogs for ${{ inputs.previous_release_tag }}..${{ inputs.future_release_tag }}'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
previous_release_tag:
|
|
required: true
|
|
description: previous release tag
|
|
future_release_tag:
|
|
required: true
|
|
description: future release tag
|
|
write_to_issue:
|
|
required: true
|
|
description: export changelogs to an issue page
|
|
default: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate changelogs
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
issues: write
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Generate release changelogs
|
|
uses: daeuniverse/changelogs-generator-action@main
|
|
id: changelog
|
|
with:
|
|
# https://github.com/daeuniverse/changelogs-generator-action
|
|
previousRelease: ${{ inputs.previous_release_tag }}
|
|
futureRelease: ${{ inputs.future_release_tag }}
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Print outputs
|
|
shell: bash
|
|
run: |
|
|
echo "${{ steps.changelog.outputs.changelogs }}"
|
|
|
|
- name: Create an issue with proposed changelogs
|
|
if: ${{ inputs.write_to_issue == 'true' }}
|
|
uses: dacbd/create-issue-action@main
|
|
with:
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
title: '[Release Changelogs] ${{ inputs.future_release_tag }}'
|
|
labels: automated-issue,release
|
|
assignees: daebot
|
|
body: |
|
|
${{ steps.changelog.outputs.changelogs }}
|