diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b83caa07..c6aaec51 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,6 +1,12 @@ name: CI + release -on: [push, pull_request] +on: + pull_request: + push: + branches: + - '**' + tags: + - '!**' jobs: build: diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index b593d6ec..2fb9246c 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -45,7 +45,14 @@ public class UpdateUtils { } private static String getUpdateJarURL(String latestVersion) { - return "https://github.com/" + REPO_NAME + "/releases/download/" + latestVersion + "/ripme-" + latestVersion + ".jar"; + // this works with a tag created in github, and thus download URLs like: + // https://github.com/ripmeapp2/ripme/releases/download/2.0.4/ripme-2.0.4-12-487e38cc.jar + return "https://github.com/" + + REPO_NAME + + "/releases/download/" + + latestVersion.substring(0, latestVersion.indexOf("-")) + + "/ripme-" + + latestVersion + ".jar"; } public static String getThisJarVersion() {