Skip to content

Commit

Permalink
Update maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
akl7777777 authored Aug 16, 2024
1 parent 01ef63f commit 1e0cbde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ jobs:
- name: Build with Maven
run: mvn clean package

- name: Find JAR file
id: find_jar
run: |
JAR_PATH=$(find target -name "*.jar" -not -name "*sources.jar" -not -name "*javadoc.jar" | head -n 1)
echo "JAR_PATH=$JAR_PATH" >> $GITHUB_OUTPUT
echo "Found JAR at $JAR_PATH"
- name: Upload JAR
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/ShellApiLogOptimizer-${{ github.ref_name }}.jar
asset_path: ${{ steps.find_jar.outputs.JAR_PATH }}
asset_name: ShellApiLogOptimizer-${{ github.ref_name }}.jar
asset_content_type: application/java-archive

0 comments on commit 1e0cbde

Please sign in to comment.