From fe751704ca715940a45add27b82413893c1c5a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Adel=C3=A9?= Date: Sun, 3 Dec 2023 08:01:41 +0100 Subject: [PATCH] ci: update releasing method --- .github/workflows/Release.yml | 10 +++------- .github/workflows/release.sh | 2 -- cog.toml | 3 ++- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index dee8da0..31f736b 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -24,13 +24,9 @@ jobs: release: true git-user: github-actions git-user-email: github-actions@github.com - - name: Release new version - run: './.github/workflows/release.sh ${{ steps.release.outputs.version }}' - - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: "chore: update version and docs for ${{ steps.release.outputs.version }} version" - add: '["README.md", "src/version.ts"]' + - name: Generate changelog and update doc & lib version + run: cog changelog --at ${{ steps.release.outputs.version }}\ + -t full_hash > GITHUB_CHANGELOG.md - name: Upload github release uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/release.sh b/.github/workflows/release.sh index 71b9744..31b89b4 100755 --- a/.github/workflows/release.sh +++ b/.github/workflows/release.sh @@ -2,8 +2,6 @@ TAGVERSION=$1 -cog changelog --at "$TAGVERSION" -t full_hash > GITHUB_CHANGELOG.md - # Version sed -i "s/\".*\"/\"$TAGVERSION\"/" src/version.ts diff --git a/cog.toml b/cog.toml index 23ea7bb..2753438 100644 --- a/cog.toml +++ b/cog.toml @@ -2,7 +2,8 @@ ignore_merge_commits = true branch_whitelist = ["main"] pre_bump_hooks = [ - "echo {{version}}", + "echo Releasing the {{version}} version", + "./.github/workflows/release.sh {{version}}", ] post_bump_hooks = [ "git push",