From ab8ba4c6a487c9ccb63d3bdab324080cd0ae8986 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sat, 6 Jun 2020 10:25:55 +0200 Subject: [PATCH] unify changelog and release actions (#29) Signed-off-by: Sebastian Gumprich --- .github/workflows/changelog.yml | 34 --------------------------------- .github/workflows/release.yml | 20 ++++++++++++++++++- 2 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index 99857c7..0000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Create Changelog - -on: - pull_request: - types: [closed] - - release: - types: [published] - - issues: - types: [closed, edited] - -jobs: - generate_changelog: - runs-on: ubuntu-latest - name: Generate changelog for master branch - steps: - - uses: actions/checkout@v1 - - - name: Generate changelog - uses: charmixer/auto-changelog-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: push - uses: github-actions-x/commit@v2.6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - push-branch: 'master' - commit-message: 'update changelog' - force-add: 'true' - files: CHANGELOG.md - name: dev-sec CI - email: github@gumpri.ch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb515e6..4d5fa69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,17 +25,35 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Generate changelog + uses: charmixer/auto-changelog-action@8095796 + with: + token: ${{ secrets.GITHUB_TOKEN }} + future_release: ${{ steps.version.outputs.next-version }} + + - name: Generate changelog for the release uses: charmixer/auto-changelog-action@8095796 with: token: ${{ secrets.GITHUB_TOKEN }} since_tag: ${{ steps.previoustag.outputs.tag }} future_release: ${{ steps.version.outputs.next-version }} + output: CHANGELOGRELEASE.md + + - name: push changelog + uses: github-actions-x/commit@v2.6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + push-branch: 'master' + commit-message: 'update changelog' + force-add: 'true' + files: CHANGELOG.md + name: dev-sec CI + email: hello@dev-sec.io - name: Read CHANGELOG.md id: package uses: juliangruber/read-file-action@v1 with: - path: ./CHANGELOG.md + path: ./CHANGELOGRELEASE.md - name: Create Release draft id: create_release