Skip to content

Commit 6f1ded3

Browse files
committed
DI deploy action updates (env)
1 parent f4dfeab commit 6f1ded3

7 files changed

Lines changed: 108 additions & 119 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Java CI with Maven
102

113
on:

.github/workflows/maven-deploy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Maven Deploy (Snapshots)
2+
3+
on:
4+
push:
5+
branches: [ "dev" ]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: OSSRH
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Maven Central Repository
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '17'
18+
distribution: 'liberica'
19+
java-package: jdk+fx # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
20+
server-id: central
21+
server-username: MAVEN_USERNAME # env variable for username in deploy
22+
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
23+
24+
- name: Publish Snapshot artifact
25+
run: mvn -B clean deploy
26+
env:
27+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
28+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
1-
name: Publish to Maven Central Repository
2-
on: workflow_dispatch
1+
name: Maven Publish manually
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
38

49
jobs:
5-
publish:
10+
publish-artifact:
611
runs-on: ubuntu-latest
12+
environment: OSSRH
13+
name: Publish artifact via Central Portal
714
steps:
8-
- uses: actions/checkout@v4
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
917
with:
1018
fetch-depth: 0
11-
- name: Set up Maven Central Repository
19+
ref: ${{ github.ref_name }}
20+
- name: Set up JDK 17
1221
uses: actions/setup-java@v4
1322
with:
1423
java-version: '17'
15-
distribution: 'temurin'
16-
cache: 'maven'
17-
server-id: ossrh
18-
server-username: OSSRH_USERNAME
19-
server-password: OSSRH_TOKEN
20-
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }} # Value of the GPG private key to import
24+
distribution: 'liberica'
25+
java-package: jdk+fx # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
26+
cache: maven
27+
server-id: central
28+
server-username: MAVEN_USERNAME # env variable for username in deploy
29+
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
30+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
2131
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
22-
23-
- name: Verify package
24-
run: mvn --batch-mode verify
25-
- name: Release package
32+
- name: Publish artifact
33+
run: mvn -B clean deploy -P release
2634
env:
27-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
28-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
35+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
36+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
2937
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
30-
run: mvn --batch-mode -DskipTests=true deploy -Prelease
38+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Maven Release
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish-artifact:
12+
runs-on: ubuntu-latest
13+
environment: OSSRH
14+
name: Publish artifact via Central Portal
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
ref: ${{ github.ref_name }}
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: '17'
25+
distribution: 'liberica'
26+
java-package: jdk+fx # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
27+
cache: maven
28+
server-id: central
29+
server-username: MAVEN_USERNAME # env variable for username in deploy
30+
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
31+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
32+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
33+
- name: Publish artifact
34+
run: mvn -B clean deploy -P release
35+
env:
36+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
37+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
38+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fx-onscreen-keyboard
2-
[![Build Status](https://travis-ci.org/comtel2000/fx-experience.png?branch=master)](https://travis-ci.org/comtel2000/fx-experience) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.comtel2000/fx-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.comtel2000/fx-parent) [![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](http://opensource.org/licenses/BSD-3-Clause)
2+
[![CI](https://github.com/comtel2000/fx-experience/actions/workflows/ci.yml/badge.svg)](https://github.com/comtel2000/fx-experience/actions/workflows/ci.yml) [![Maven Central Version](https://img.shields.io/maven-central/v/org.comtel2000/fx-parent)](https://central.sonatype.com/artifact/org.comtel2000/fx-parent) [![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](http://opensource.org/licenses/BSD-3-Clause)
33

44
*FXOK* provides a JavaFX 8 (OpenJFX 11-17) based virtual on-screen keyboard component for touch based monitors with xml layout configuration
55

pom.xml

Lines changed: 15 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,8 @@
5151
<url>https://github.com/comtel2000/fx-experience</url>
5252
<connection>scm:git:git@github.com:comtel2000/fx-experience.git</connection>
5353
<developerConnection>scm:git:git@github.com:comtel2000/fx-experience.git</developerConnection>
54-
<tag>v17.0.0</tag>
5554
</scm>
5655

57-
<ciManagement>
58-
<system>Travis CI</system>
59-
<url>https://travis-ci.org/comtel2000/fx-experience/</url>
60-
</ciManagement>
61-
6256
<dependencyManagement>
6357
<dependencies>
6458
<dependency>
@@ -96,7 +90,6 @@
9690
<plugin>
9791
<groupId>org.apache.maven.plugins</groupId>
9892
<artifactId>maven-javadoc-plugin</artifactId>
99-
<version>3.11.2</version>
10093
<executions>
10194
<execution>
10295
<id>attach-javadocs</id>
@@ -117,53 +110,16 @@
117110
<goals>
118111
<goal>sign</goal>
119112
</goals>
113+
<configuration>
114+
<gpgArguments>
115+
<arg>--pinentry-mode</arg>
116+
<arg>loopback</arg>
117+
</gpgArguments>
118+
</configuration>
120119
</execution>
121120
</executions>
122121
</plugin>
123-
<plugin>
124-
<groupId>org.sonatype.central</groupId>
125-
<artifactId>central-publishing-maven-plugin</artifactId>
126-
<version>0.7.0</version>
127-
<extensions>true</extensions>
128-
<configuration>
129-
<publishingServerId>central</publishingServerId>
130-
<autoPublish>true</autoPublish>
131-
</configuration>
132-
</plugin>
133-
</plugins>
134-
</build>
135-
</profile>
136122

137-
<profile>
138-
<id>javadoc-and-source</id>
139-
<build>
140-
<plugins>
141-
<plugin>
142-
<groupId>org.apache.maven.plugins</groupId>
143-
<artifactId>maven-source-plugin</artifactId>
144-
<version>3.3.1</version>
145-
<executions>
146-
<execution>
147-
<id>attach-sources</id>
148-
<goals>
149-
<goal>jar-no-fork</goal>
150-
</goals>
151-
</execution>
152-
</executions>
153-
</plugin>
154-
<plugin>
155-
<groupId>org.apache.maven.plugins</groupId>
156-
<artifactId>maven-javadoc-plugin</artifactId>
157-
<version>3.11.2</version>
158-
<executions>
159-
<execution>
160-
<id>attach-javadocs</id>
161-
<goals>
162-
<goal>jar</goal>
163-
</goals>
164-
</execution>
165-
</executions>
166-
</plugin>
167123
</plugins>
168124
</build>
169125
</profile>
@@ -176,9 +132,15 @@
176132
<artifactId>maven-compiler-plugin</artifactId>
177133
</plugin>
178134
<plugin>
179-
<groupId>org.codehaus.mojo</groupId>
180-
<artifactId>findbugs-maven-plugin</artifactId>
181-
<version>3.0.5</version>
135+
<groupId>org.sonatype.central</groupId>
136+
<artifactId>central-publishing-maven-plugin</artifactId>
137+
<version>0.7.0</version>
138+
<extensions>true</extensions>
139+
<configuration>
140+
<publishingServerId>central</publishingServerId>
141+
<autoPublish>true</autoPublish>
142+
<waitUntil>uploaded</waitUntil>
143+
</configuration>
182144
</plugin>
183145
</plugins>
184146

@@ -206,40 +168,8 @@
206168
</archive>
207169
</configuration>
208170
</plugin>
209-
<plugin>
210-
<groupId>org.apache.maven.plugins</groupId>
211-
<artifactId>maven-release-plugin</artifactId>
212-
<version>3.1.1</version>
213-
<configuration>
214-
<autoVersionSubmodules>true</autoVersionSubmodules>
215-
<useReleaseProfile>true</useReleaseProfile>
216-
<releaseProfiles>release</releaseProfiles>
217-
<goals>deploy</goals>
218-
<tagNameFormat>v@{project.version}</tagNameFormat>
219-
</configuration>
220-
</plugin>
221171
</plugins>
222172
</pluginManagement>
223173
</build>
224174

225-
<reporting>
226-
<plugins>
227-
<plugin>
228-
<groupId>org.apache.maven.plugins</groupId>
229-
<artifactId>maven-checkstyle-plugin</artifactId>
230-
<version>3.6.0</version>
231-
</plugin>
232-
</plugins>
233-
</reporting>
234-
235-
<distributionManagement>
236-
<snapshotRepository>
237-
<id>ossrh</id>
238-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
239-
</snapshotRepository>
240-
<repository>
241-
<id>ossrh</id>
242-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
243-
</repository>
244-
</distributionManagement>
245175
</project>

0 commit comments

Comments
 (0)