From 6fde76c8012b5eff84b4ad0033048e02abdff12c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira da Silva Date: Wed, 12 Jun 2024 15:32:35 -0300 Subject: [PATCH] Updates Signed-off-by: Bruno Oliveira da Silva --- .github/workflows/release.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bda41f4..079811b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,29 +24,32 @@ jobs: - name: Get version from pom.xml id: get_version - run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + run: echo "::set-output name=version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" - name: Find ZIP file id: find_zip - run: echo "ZIP_PATH=$(find target -name 'loki-*-SNAPSHOT-dist.zip')" >> $GITHUB_ENV + run: echo "::set-output name=zip_path::$(find target -name 'loki-*-SNAPSHOT-dist.zip')" + + - name: Debug - Check Version and ZIP Path + run: | + echo "Version: ${{ steps.get_version.outputs.version }}" + echo "ZIP Path: ${{ steps.find_zip.outputs.zip_path }}" - name: Create GitHub release id: create_release uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v${{ env.VERSION }} - release_name: Release ${{ env.VERSION }} + tag_name: v${{ steps.get_version.outputs.version }} + release_name: Release ${{ steps.get_version.outputs.version }} draft: false prerelease: false + token: ${{ secrets.GITHUB_TOKEN }} - name: Upload ZIP to release uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ env.ZIP_PATH }} - asset_name: loki-${{ env.VERSION }}-SNAPSHOT-dist.zip + asset_path: ${{ steps.find_zip.outputs.zip_path }} + asset_name: loki-${{ steps.get_version.outputs.version }}-SNAPSHOT-dist.zip asset_content_type: application/zip + token: ${{ secrets.GITHUB_TOKEN }}