v0.0.3 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Set up JDK | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 # Specify your JDK version | |
distribution: 'temurin' | |
# Cache Gradle dependencies | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle | |
# Build the JAR file | |
- name: Build JAR | |
run: ./gradlew bootJar downloadDigmaAgentExtension downloadOtelAgent | |
- name: Copy Jar file | |
run: mv build/libs/spring-petclinic-*.jar petclinic-${{ github.ref_name }}.jar | |
- 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: ./petclinic-${{ github.ref_name }}.jar | |
asset_name: petclinic-${{ github.ref_name }}.jar | |
asset_content_type: application/java-archive |