Skip to content

Commit b2ee773

Browse files
author
Francisco Solis
committed
GitHub Packages & Gradle Wrapper Validator
* Now packages will be uploaded to github and our own repo * Gradle Wrapper will be automatically validated
1 parent 6996d5a commit b2ee773

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.github/workflows/gradle-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ jobs:
66
build:
77
# Setup the OS
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
912
env:
1013
NEXUS_USERNAME: '${{ secrets.NEXUS_USERNAME }}'
1114
NEXUS_PASSWORD: '${{ secrets.NEXUS_PASSWORD }}'
15+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
1216
steps:
1317
# Checkout the code
1418
- name: Ceckout the Code
@@ -19,6 +23,9 @@ jobs:
1923
with:
2024
distribution: adopt
2125
java-version: 8
26+
# Validate Gradle Wrapper
27+
- name: Validate Gradle Wrapper
28+
uses: gradle/wrapper-validation-action@v1
2229
# Test and deploy
2330
- name: Make gradle executable
2431
run: chmod +x gradlew

.github/workflows/gradle-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
with:
2222
distribution: adopt
2323
java-version: ${{ matrix.java-version }}
24+
# Validate Gradle Wrapper
25+
- name: Validate Gradle Wrapper
26+
uses: gradle/wrapper-validation-action@v1
2427
# Setup executable gradle
2528
- name: Make Gradle executable
2629
run: chmod +x gradlew

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,19 @@ publishing {
168168
}
169169
repositories {
170170
maven {
171+
name = 'TheProgramSrcRepository'
171172
credentials.username = System.getenv('NEXUS_USERNAME')
172173
credentials.password = System.getenv('NEXUS_PASSWORD')
173174
url = uri(version.contains('-SNAPSHOT') ? 'https://repo.theprogramsrc.xyz/repository/maven-snapshots/' : 'https://repo.theprogramsrc.xyz/repository/maven-releases/')
174175
}
176+
maven {
177+
name = 'GitHubPackages'
178+
url = 'https://maven.pkg.github.com/TheProgramSrc/SuperCoreAPI'
179+
credentials {
180+
username = System.getenv('GITHUB_ACTOR')
181+
password = System.getenv('GITHUB_TOKEN')
182+
}
183+
}
175184
}
176185
}
177186

0 commit comments

Comments
 (0)