mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-11 02:56:21 +00:00
44 lines
1.7 KiB
YAML
44 lines
1.7 KiB
YAML
# Automates creation of changelog drafts using Release Drafter
|
|
# More Info: https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
|
|
name: Changelog Drafter
|
|
|
|
on:
|
|
push:
|
|
# branches to consider in the event; optional, defaults to all
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
update_draft_release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Drafts your next Release notes as Pull Requests are merged into "master"
|
|
- name: Generate GitHub Release Draft
|
|
id: release-drafter
|
|
uses: release-drafter/release-drafter@v5.13.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Generates a YAML changelog file using https://github.com/jenkinsci/jenkins-core-changelog-generator
|
|
- name: Generate YAML changelog draft
|
|
id: jenkins-core-changelog-generator
|
|
uses: jenkinsci/jenkins-core-changelog-generator@master
|
|
env:
|
|
GITHUB_AUTH: github-actions:${{ secrets.GITHUB_TOKEN }}
|
|
- name: Upload Changelog YAML
|
|
uses: actions/upload-artifact@v2.2.1
|
|
with:
|
|
name: changelog.yaml
|
|
path: changelog.yaml
|
|
#TODO(oleg-nenashev): It will not work well with Release Drafter which does not recreated releases. Asset does not get overwritten, and there is no ready-to-go API for overriding assets
|
|
# Upload YAML to the release draft assets
|
|
# - name: Upload changelog.yaml to the Release Draft
|
|
# id: upload-changelog-yaml
|
|
# uses: actions/upload-release-asset@v1.0.1
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# with:
|
|
# upload_url: ${{ steps.release-drafter.outputs.upload_url }}
|
|
# asset_path: ./changelog.yaml
|
|
# asset_name: changelog.yaml
|
|
# asset_content_type: text/yaml
|