v0.1.6, added new profiule #8
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: Build and Release JAR | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # z. B. v1.0.0, v2.1.3 etc. | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build with Gradle | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' # oder 11, je nach deinem Projekt | |
| - name: Pull Daras Library | |
| run: | | |
| mkdir -p libs | |
| curl -L -o libs/daras_library-0.1.5-SNAPSHOT.jar "https://github.com/ShadowDara/daras_library/releases/download/v0.1.5/daras_library-0.1.5-SNAPSHOT.jar" | |
| - name: Grant execute permission for Gradle wrapper | |
| run: chmod +x gradlew | |
| - name: Build JAR | |
| run: ./gradlew clean build | |
| - name: Find JAR file | |
| id: get_jar | |
| run: | | |
| JAR_PATH=$(find build/libs -name "*.jar" | head -n 1) | |
| echo "JAR_PATH=$JAR_PATH" >> $GITHUB_ENV | |
| echo "::set-output name=jar::$JAR_PATH" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Release ${{ github.ref_name }} | |
| tag_name: ${{ github.ref }} | |
| files: ${{ steps.get_jar.outputs.jar }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |