From 6abe83308ce1d4b48aa84837e4ab7c03e7f274e4 Mon Sep 17 00:00:00 2001 From: cutecatsandvirtualmachines <145232977+cutecatsandvirtualmachines@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:05:55 +0200 Subject: [PATCH] v1.0.0 --- .github/workflows/build-release.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2843202..c7e72f4 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -55,6 +55,25 @@ jobs: - name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'" shell: cmd run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE + - name: Extract Subject and Body + id: extract_message + run: | + # Extract the full commit message + full_message="${{ github.event.head_commit.message }}" + + # Extract the first line as the subject + subject=$(echo "$full_message" | head -n 1) + + # Extract the rest as the body (starting from line 2) + body=$(echo "$full_message" | tail -n +2) + + # Output the extracted subject and body + echo "Commit Subject: $subject" + echo "Commit Body: $body" + + # Set as environment variables for later steps + echo "commit_subject=$subject" >> $GITHUB_ENV + echo "commit_body=$body" >> $GITHUB_ENV - name: Run vcpkg uses: lukka/run-vcpkg@v11 with: @@ -118,8 +137,9 @@ jobs: echo "matches=false" >> $GITHUB_ENV fi - name: Create ZIP Archive + if: env.matches == 'true' run: | - zip -r SKLib.zip "${{env.SOLUTION_FILE_PATH}}/x64/${{env.BUILD_CONFIGURATION}}" + tar -czf SKLib.tar.gz "${{env.SOLUTION_FILE_PATH}}/x64/${{env.BUILD_CONFIGURATION}}" shell: bash - name: Release uses: softprops/action-gh-release@v2 @@ -127,6 +147,7 @@ jobs: with: files: | '${{env.SOLUTION_FILE_PATH}}/x64/${{env.BUILD_CONFIGURATION}}/*' - SKLib.zip + SKLib.tar.gz token: ${{ secrets.GITHUB_TOKEN }} - tag_name: ${{ github.event.head_commit.message }} + tag_name: ${{ env.commit_subject }} + body: ${{ env.commit_body }}