From 2dd53178cfef9922523bfffec575e06e78dcb9d6 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Fri, 7 Feb 2025 09:43:21 -0600 Subject: [PATCH] Update release workflow and tasks - Updated the release workflow to use a more efficient method for setting the commit message. - Added a new task to the VSCode tasks.json file to create a new release with a dynamic tag based on the current date and time. These changes improve the efficiency and automation of the release process, ensuring that releases are created with accurate and up-to-date information. --- .gitea/workflows/main.yml | 6 +++--- .vscode/tasks.json | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 15c4789..d209fca 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -35,8 +35,8 @@ jobs: && cp src/module.json dist/ && echo \"Done!\nArchived to ${ZIP_FILENAME} and copied module.js.\" - - name: Echo commit message - run: echo "`${{ github.event.head_commit.message }}`" + - name: Setting commit message + run: echo "COMMIT_MSG=$(git log -1 --pretty=%B)" >> "$GITHUB_ENV" && echo "COMMIT MESSAGE IS `$COMMIT_MSG`" # Create a release for this specific version - name: Update Release with Files @@ -46,4 +46,4 @@ jobs: files: |- ./dist/module.json ./dist/module.zip - body: ${{ github.event.head_commit.message }} \ No newline at end of file + body: $COMMIT_MSG \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ab05f43..4267b7f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,10 +4,15 @@ "version": "2.0.0", "tasks": [ { - "label": "new release", + "label": "commit and new release", "type": "shell", "command": "TAG=$(date +\"%Y%m%d.%H%M%S\"); git add . && git commit -m \"$TAG\" && git push origin main && tea release create --title \"$TAG\" --tag=\"v$TAG\"", "problemMatcher":[] + }, + { + "label": "new release", + "type": "shell", + "command": "TAG=$(date +\"%Y%m%d.%H%M%S\"); git push origin main && tea release create --title \"$TAG\" --tag=\"v$TAG\"" } ] } \ No newline at end of file