Skip to content

Commit

Permalink
Melhoria do Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Sep 4, 2024
1 parent cb1e170 commit 47fc8b7
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 37 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
time: "12:00"
timezone: "America/Sao_Paulo"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "12:00"
timezone: "America/Sao_Paulo"
6 changes: 0 additions & 6 deletions .github/renovate.json

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

name: Build and Upload

on:
push:
branches: [ "master", "update" ]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
check-latest: true
cache: gradle
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build
- name: Upload Plugin
uses: actions/[email protected]
with:
name: PlayerPoints
path: build/libs/*.jar
33 changes: 2 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.gradleup.shadow' version '8.3.0'
id 'java-library'
id 'maven-publish'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'org.black_ixx'
version = '3.2.7'

Expand Down Expand Up @@ -50,7 +48,7 @@ compileJava {
}

processResources {
from (sourceSets.main.resources.srcDirs) {
from(sourceSets.main.resources.srcDirs) {
include '**/*.yml'
filter ReplaceTokens, tokens: ["version": project.property("version")]
duplicatesStrategy DuplicatesStrategy.INCLUDE
Expand All @@ -64,31 +62,4 @@ shadowJar {
relocate('dev.rosewood.rosegarden', 'org.black_ixx.playerpoints.libs.rosegarden')
}

publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
artifactId = 'playerpoints'
pom {
name = 'playerpoints'
}
}
}
repositories {
if (project.hasProperty('mavenUser') && project.hasProperty('mavenPassword')) {
maven {
credentials {
username project.mavenUser
password project.mavenPassword
}

def releasesRepoUrl = 'https://repo.rosewooddev.io/repository/public-releases/'
def snapshotsRepoUrl = 'https://repo.rosewooddev.io/repository/public-snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
}

build.dependsOn shadowJar
publishShadowPublicationToMavenRepository.dependsOn jar

0 comments on commit 47fc8b7

Please sign in to comment.