Release Workflow Setup

This commit is contained in:
shabinder 2021-09-05 20:19:55 +05:30
parent 3f4008e2be
commit 6b14a9f175
4 changed files with 99 additions and 35 deletions

View File

@ -0,0 +1,95 @@
on:
[workflow_dispatch]
jobs:
create-linux-package:
runs-on: ubuntu-latest
name: Create Deb Package
steps:
# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 15
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.3.1
# Build Desktop application
- name: Desktop App
run: ./gradlew :desktop:packageUberJarForCurrentOS
# Create a Draft Release
- name: Draft Release
uses: ncipollo/release-action@v1
with:
draft: true
tag: "3.3.0"
artifacts: "desktop\build\compose\jars\*.jar"
token: ${{ secrets.GH_TOKEN }}
commit: main
# bodyFile: "body.md"
#
# create-macos-package:
# runs-on: macos-latest
## needs: create_staging_repository
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Configure JDK
# uses: actions/setup-java@v1
# with:
# java-version: 14
# - name: Publish
# run: |
# ./gradlew publishAllPublicationsToMavenRepository -PSONATYPE_REPOSITORY_ID=${{ needs.create_staging_repository.outputs.repository_id }}
# env:
# MANUAL_REPOSITORY: ${{ secrets.MANUAL_REPOSITORY }}
# SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
# SONATYPE_USERNAME: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
# SONATYPE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
# GPG_PRIVATE_KEY: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_KEY }}
# GPG_PRIVATE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_PASSWORD }}
#
# create-windows-package:
# runs-on: windows-latest
# needs: create_staging_repository
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Configure JDK
# uses: actions/setup-java@v1
# with:
# java-version: 14
# - name: Publish
# run: |
# ./gradlew publishMingwX64PublicationToMavenRepository -PSONATYPE_REPOSITORY_ID=${{ needs.create_staging_repository.outputs.repository_id }}
# env:
# MANUAL_REPOSITORY: ${{ secrets.MANUAL_REPOSITORY }}
# SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
# SONATYPE_USERNAME: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
# SONATYPE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
# GPG_PRIVATE_KEY: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_KEY }}
# GPG_PRIVATE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_PASSWORD }}
#
# finalize:
# runs-on: ubuntu-latest
# needs: [create_staging_repository,macos,windows]
# if: ${{ always() && needs.create_staging_repository.result == 'success' }}
# steps:
# - name: Discard
# if: ${{ needs.macos.result != 'success' || needs.windows.result != 'success' }}
# uses: nexus-actions/drop-nexus-staging-repo@main
# with:
# username: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
# password: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
# staging_repository_id: ${{ needs.create_staging_repository.outputs.repository_id }}
# - name: Release
# if: ${{ needs.macos.result == 'success' && needs.windows.result == 'success' }}
# uses: nexus-actions/release-nexus-staging-repo@main
# with:
# base_url: https://s01.oss.sonatype.org/service/local/
# username: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
# password: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
# staging_repository_id: ${{ needs.create_staging_repository.outputs.repository_id }}

View File

@ -57,8 +57,6 @@ kotlin {
// Koin
implementation(Koin.core)
// Matomo
implementation("org.piwik.java.tracking:matomo-java-tracker:1.6")
}
}
val jvmTest by getting
@ -68,7 +66,7 @@ kotlin {
compose.desktop {
application {
mainClass = "MainKt"
description = "Music Downloader for Spotify, Gaana, Youtube Music."
description = "Music Downloader for Spotify, Gaana, Jio Saavn, Youtube Music."
nativeDistributions {
modules("java.sql", "java.security.jgss", "jdk.crypto.ec")
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
@ -84,7 +82,8 @@ compose.desktop {
windows {
iconFile.set(iconsRoot.resolve("spotiflyer.ico"))
// Wondering what the heck is this? See : https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
upgradeUuid = "ace223ed-3ffb-452c-bc90-082e9e0a6d5d"
// https://www.guidgen.com/
upgradeUuid = "9f9e966b-7eef-42c7-a49c-5194b17fabd0"
menuGroup = packageName
}
linux {

View File

@ -20,7 +20,6 @@ import androidx.compose.material.Surface
import androidx.compose.ui.Modifier
import androidx.compose.ui.awt.ComposeWindow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Path
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
@ -97,7 +96,7 @@ fun main() {
// FFmpeg WARNING
try {
FFmpeg.atPath().addArgument("-version").execute();
FFmpeg.atPath().addArgument("-version").execute()
} catch (e: Exception) {
if (e is JaffreeException) methods.value.showPopUpMessage("WARNING!\nFFmpeg not found at path")
}

View File

@ -1,29 +0,0 @@
package utils
import org.piwik.java.tracking.PiwikRequest
import org.piwik.java.tracking.PiwikTracker
import java.net.URL
fun PiwikTracker.trackAsync(
baseURL: String = "https://com.shabinder.spotiflyer/",
requestBuilder: PiwikRequest.() -> Unit = {}
) {
val req = PiwikRequest(
1,
URL(baseURL)
).apply { requestBuilder() }
// Send Request
sendRequestAsync(req)
}
fun PiwikTracker.trackScreenAsync(
screenAddress: String,
requestBuilder: PiwikRequest.() -> Unit = {}
) {
val req = PiwikRequest(
1,
URL("https://com.shabinder.spotiflyer$screenAddress")
).apply { requestBuilder() }
// Send Request
sendRequestAsync(req)
}