-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (34 loc) · 1.08 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Java CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch: # Agrega esta línea para habilitar la ejecución manual
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
with:
min-wrapper-count: 1
allow-snapshots: false
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.25-9/x64
JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.25-9/x64
- name: Publish package to Nexus
run: ./gradlew publish --no-daemon -PnexusUsername=${{ secrets.NEXUS_USERNAME }} -PnexusPassword=${{ secrets.NEXUS_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}