Skip to content

Commit 5bf98ba

Browse files
committed
add version variable
1 parent a308ecf commit 5bf98ba

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ jobs:
6363
# id: properties
6464
# with:
6565
# output_file: ${{ github.output }}
66-
66+
- name: Get VERSION_NAME from gradle.properties
67+
id: version
68+
run: |
69+
VERSION_NAME=$(grep VERSION_NAME gradle.properties | cut -d'=' -f2)
70+
echo "VERSION_NAME=$VERSION_NAME"
71+
echo "version_name=$VERSION_NAME" >> $GITHUB_OUTPUT
72+
6773
# Create GitHub Release
6874
- name: Create GitHub Release
6975
id: create_release
@@ -85,6 +91,6 @@ jobs:
8591
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8692
with:
8793
upload_url: ${{ steps.create_release.outputs.upload_url }}
88-
asset_path: /home/runner/work/prometheus-exporter-plugin-for-opensearch/prometheus-exporter-plugin-for-opensearch/prometheus-exporter-3.0.0.0.zip
89-
asset_name: prometheus-exporter-3.0.0.0.zip
94+
asset_path: prometheus-exporter-${{ steps.version.outputs.version_name }}.zip
95+
asset_name: prometheus-exporter-${{ steps.version.outputs.version_name }}.zip
9096
asset_content_type: application/zip

0 commit comments

Comments
 (0)