From a68949207556525c745a8f09b5abb0a2f763bea6 Mon Sep 17 00:00:00 2001 From: Lucas de Sousa Rosa Date: Thu, 30 Nov 2023 08:43:09 -0300 Subject: [PATCH] Add permission to release action and fix missing text on post-commit hook --- .git-hooks/post-commit | 4 ++-- .github/workflows/tag-to-release.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.git-hooks/post-commit b/.git-hooks/post-commit index 9891333..21badbb 100755 --- a/.git-hooks/post-commit +++ b/.git-hooks/post-commit @@ -2,9 +2,9 @@ version=`git diff HEAD^..HEAD -- "$(git rev-parse --show-toplevel)"/pyproject.toml | grep -m 1 '^\+.*version' | sed -s 's/[^A-Z0-9\.\-]//g'` if [[ ! $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)(\-[A-Z]+\.[0-9]+)?$ ]]; then - echo -e "Skip tag: invalid version '$version'" + echo -e "Skip tag: invalid version 'v$version'" exit 1 fi git tag -a "v$version" -m "`git log -1 --format=%s`" -echo "Created a new tag, $version" \ No newline at end of file +echo "Created a new tag, v$version" \ No newline at end of file diff --git a/.github/workflows/tag-to-release.yml b/.github/workflows/tag-to-release.yml index 3d31857..277a52c 100644 --- a/.github/workflows/tag-to-release.yml +++ b/.github/workflows/tag-to-release.yml @@ -5,6 +5,8 @@ on: name: Create releases on tag push +permissions: write-all + jobs: build: name: Create release