From 1d4a8aecd9f948d07403bfbb850c4cb0a94d24cd Mon Sep 17 00:00:00 2001 From: Massimo Gengarelli Date: Fri, 5 Jul 2024 14:59:49 +0200 Subject: [PATCH] ci: fix cog configuration for GitHub --- .github/workflows/release.yaml | 25 ++++++++++++++++--------- cog.toml | 1 - 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b3f8f3..68baeb0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,24 +25,31 @@ jobs: docker tag "${IMAGE}:$(make image-tag)" "${IMAGE}:latest" docker push "${IMAGE}:latest" release: - name: Generate Changelog + name: Release new version runs-on: ubuntu-latest needs: deploy steps: - name: Checkout uses: actions/checkout@v4 - - name: Use cocogitto to generate CHANGELOG.md + - name: Install Cocogitto uses: cocogitto/cocogitto-action@v3 with: - release: true + release: false + check: false + git-user: 'github-actions[bot]' + git-user-email: 'github-actions@github.com' + - name: Create Release Notes + run: cog changelog --at ${{ github.ref_name }} > tmp.md + - name: Bump version + run: cog bump --version ${{ github.ref_name }} + - name: Push back to repository + run: | + git config user.email "github-actions@github.com" + git config user.name "github-actions[bot]" + git push - uses: softprops/action-gh-release@v2 with: - body_path: CHANGELOG.md + body_path: tmp.md generate_release_notes: true make_latest: "true" draft: false - - name: Commit back report - run: | - git config user.email "github-actions@github.com" - git config user.name "github-actions[bot]" - git push diff --git a/cog.toml b/cog.toml index fe0410c..6e2b73c 100644 --- a/cog.toml +++ b/cog.toml @@ -1,4 +1,3 @@ tag_prefix = "v" -branch_whitelist = ["main"] ignore_merge_commits = true skip_ci = "[ci skip]"