Skip to content

Added upload JAR as a release asset #9

Added upload JAR as a release asset

Added upload JAR as a release asset #9

Workflow file for this run

name: Build JAR for release
on:
push:
branches: [ main, jar_release_gh_action ]
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
- name: Gradle build
run: ./gradlew build --no-daemon
- name: Check if JAR exists
run: ls -l build/libs/
# - name: Upload JAR
# if: github.event.name == 'release'
# uses: actions/upload-artifact@v4
# with:
# name: bitwig-theme-editor
# path: build/libs/*.jar
- name: Upload JAR release asset
uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/heads/main')
with:
tag_name: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
files: |
build/libs/*.jar