generated from adempiere/adempiere-template-project
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (61 loc) · 2.43 KB
/
publish.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This is a basic workflow to help you get started with Actions
# This file was contributed by Carlos Parada, Edwin Betancourt and Yamel Senih from ERP Consultores y Asociados, C.A
name: Publish With gradle to maven central
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
release:
types:
- published
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
publish-sonatype:
name: Publish Project (Sonatype)
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Java JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: 11
architecture: x64
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.0.2
arguments: publish
env:
ORG_GRADLE_PROJECT_deployVersion: ${{ github.event.release.tag_name }}
ORG_GRADLE_PROJECT_deployPublishUrl: ${{ secrets.DEPLOY_PUBLISH_SONATYPE_URL }}
ORG_GRADLE_PROJECT_deploySigningKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_deploySigningPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_deployUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_deployPassword: ${{ secrets.OSSRH_TOKEN }}
publish-github:
name: Publish Project (Github)
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Java JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: 11
architecture: x64
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.0.2
arguments: publish
env:
ORG_GRADLE_PROJECT_deployVersion: ${{ github.event.release.tag_name }}
ORG_GRADLE_PROJECT_deployPublishUrl: ${{ secrets.DEPLOY_PUBLISH_GITHUB_URL }}
ORG_GRADLE_PROJECT_deploySigningKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_deploySigningPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_deployUsername: "${{ github.actor }}"
ORG_GRADLE_PROJECT_deployPassword: "${{ secrets.DEPLOY_TOKEN }}"