From 9efe561a29092dc388bc9ce1489487918acf9840 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 27 Jun 2023 14:47:05 +0200 Subject: [PATCH 1/3] Make 'Update changelog' a reusable workflow --- .github/workflows/update-changelog.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index d41c847..ea6eec7 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -1,6 +1,7 @@ name: 'Update Changelog' on: + workflow_call: release: types: [released] From c0f5eb56f9f1683fb0d1b4473143fd93270ff0dc Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 27 Jun 2023 14:47:17 +0200 Subject: [PATCH 2/3] Clean up --- .github/workflows/ft-releases.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/ft-releases.yml diff --git a/.github/workflows/ft-releases.yml b/.github/workflows/ft-releases.yml deleted file mode 100644 index 47c8537..0000000 --- a/.github/workflows/ft-releases.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'f.t Releases' - -on: - workflow_call: - push: - tags: - - '*' - -jobs: - release: - if: startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - steps: - - name: Build Changelog - id: github_release - uses: mikepenz/release-changelog-builder-action@v3 - with: - failOnError: true - outputFile: ./CHANGELOG.md - # token: ${{ secrets.BOT_TOKEN }} - env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - - - name: Create Release - uses: mikepenz/action-gh-release@v0.2.0-a03 #softprops/action-gh-release - with: - body: ${{steps.github_release.outputs.changelog}} \ No newline at end of file From 15c5a21a956583da40556565fe2f99013bc91d68 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 27 Jun 2023 14:58:28 +0200 Subject: [PATCH 3/3] Prepare 'Release drafter' as a reusable workflow --- .github/workflows/release-drafter.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..9bfb921 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,31 @@ +name: 'Draft next Release notes' + +on: + workflow_call: + push: + # branches to consider in the event; optional, defaults to all + 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: + + # Drafts your next Release notes as Pull Requests are merged into "main" + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}