diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 85ba45d..a1fd27e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,6 @@ on: [push] jobs: build: - name: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..69bb2c5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,32 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: zulu + - uses: gradle/gradle-build-action@v2 + with: + gradle-version: 7.6 + arguments: bootJar + + - run: echo "tag=${REF##*/v}" >> $GITHUB_ENV + + - uses: softprops/action-gh-release@v1 + env: + token: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.tag }} + name: ${{ env.tag }} + draft: false + files: player/app/build/libs/* \ No newline at end of file diff --git a/player/app/build.gradle b/player/app/build.gradle index f1d0227..fda2103 100644 --- a/player/app/build.gradle +++ b/player/app/build.gradle @@ -13,4 +13,8 @@ dependencies { implementation 'com.dorkbox:SystemTray:4.1' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' +} + +bootJar { + archiveBaseName.set('java-airplay-server') } \ No newline at end of file