Skip to content

Commit df63574

Browse files
authored
Merge pull request #140 from andylintner/artifact-upload
Setup for release
2 parents b090400 + fc882b9 commit df63574

11 files changed

+98
-77
lines changed

.github/workflows/deploy.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Java CI with Maven and Deploy
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 11 for Maven Central
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: '11'
21+
architecture: x64
22+
server-id: ossrh
23+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
24+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
25+
server-username: MAVEN_USERNAME
26+
server-password: MAVEN_CENTRAL_TOKEN
27+
- name: Publish to Maven Central
28+
run: mvn deploy
29+
env:
30+
MAVEN_USERNAME: hap-java-dev
31+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
32+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
33+
- name: Publish site
34+
run: mvn deploy-site

.github/workflows/maven.yml

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
name: Java CI with Maven
55

66
on:
7-
push:
8-
branches: [ master ]
97
pull_request:
108
branches: [ master ]
119

.github/workflows/release.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Stage Release on Master Branch
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
releaseVersion:
10+
description: Version to release
11+
required: true
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: '11'
24+
architecture: x64
25+
server-id: ossrh
26+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
27+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
28+
server-username: MAVEN_USERNAME
29+
server-password: MAVEN_CENTRAL_TOKEN
30+
- name: Setup git profile
31+
run: |
32+
git config user.name github-actions
33+
git config user.email [email protected]
34+
- name: Maven release
35+
run: mvn release:prepare release:perform -B -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -Possrh
36+
env:
37+
MAVEN_USERNAME: hap-java-dev
38+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
39+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
HAP-Java
22
=========
3+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.hap-java/hap/badge.svg)](https://search.maven.org/search?q=g:io.github.hap-java%20a:hap)
4+
[![MIT License](https://img.shields.io/github/license/hap-java/HAP-Java)](https://github.com/hap-java/HAP-Java/blob/master/LICENSE)
5+
![Maven Build Status](https://github.com/andylintner/HAP-Java/actions/workflows/maven.yml/badge.svg)
6+
37
HAP-Java is a Java implementation of the HomeKit Accessory Protocol.
48

59
Using this library, you can create your own HomeKit Accessory or HomeKit Accessory Bridge.

RELEASING.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# How to release HAP-Java
2+
3+
These actions can only be performed by someone with maintainer level access to the repository.
4+
5+
1. Run the [Stage Release on Master Branch](https://github.com/hap-java/HAP-Java/actions/workflows/release.yml) Action
6+
2. After this completes, find the release on the [Releases page](https://github.com/hap-java/HAP-Java/releases)
7+
3. Edit the release to include the changelog details

deploy/distribution.xml

-18
This file was deleted.

deploy/publish.sh

-5
This file was deleted.

deploy/pubring.gpg.enc

-253 KB
Binary file not shown.

deploy/secring.gpg.enc

-5.39 KB
Binary file not shown.

deploy/settings.xml

-9
This file was deleted.

pom.xml

+14-43
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<scm>
2626
<connection>scm:git:https://github.com/hap-java/HAP-Java.git</connection>
27-
<developerConnection>scm:git:git@github.com:hap-java/HAP-Java.git</developerConnection>
27+
<developerConnection>scm:git:https://github.com/hap-java/HAP-Java.git</developerConnection>
2828
<url>https://github.com/hap-java/HAP-Java.git</url>
2929
<tag>HEAD</tag>
3030
</scm>
@@ -208,24 +208,6 @@
208208
</execution>
209209
</executions>
210210
</plugin>
211-
<plugin>
212-
<artifactId>maven-assembly-plugin</artifactId>
213-
<version>3.1.1</version>
214-
<configuration>
215-
<descriptors>
216-
<descriptor>deploy/distribution.xml</descriptor>
217-
</descriptors>
218-
</configuration>
219-
<executions>
220-
<execution>
221-
<id>make-assembly</id> <!-- this is used for inheritance merges -->
222-
<phase>package</phase> <!-- bind to the packaging phase -->
223-
<goals>
224-
<goal>single</goal>
225-
</goals>
226-
</execution>
227-
</executions>
228-
</plugin>
229211
<plugin>
230212
<groupId>org.apache.maven.plugins</groupId>
231213
<artifactId>maven-scm-publish-plugin</artifactId>
@@ -238,7 +220,7 @@
238220
<goal>publish-scm</goal>
239221
</goals>
240222
<configuration>
241-
<pubScmUrl>scm:git:git@github.com:hap-java/HAP-Java.git</pubScmUrl>
223+
<pubScmUrl>scm:git:https://github.com/hap-java/HAP-Java.git</pubScmUrl>
242224
<scmBranch>gh-pages</scmBranch>
243225
</configuration>
244226
</execution>
@@ -284,11 +266,11 @@
284266
</site>
285267
<repository>
286268
<id>ossrh</id>
287-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
269+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
288270
</repository>
289271
<snapshotRepository>
290272
<id>ossrh</id>
291-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
273+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
292274
</snapshotRepository>
293275
</distributionManagement>
294276

@@ -305,6 +287,8 @@
305287
<version>3.0.1</version>
306288
<configuration>
307289
<excludePackageNames>io.github.hapjava.server.impl</excludePackageNames>
290+
<source>8</source>
291+
<detectJavaApiLink>false</detectJavaApiLink>
308292
</configuration>
309293
<reportSets>
310294
<reportSet>
@@ -325,20 +309,6 @@
325309
<profiles>
326310
<profile>
327311
<id>ossrh</id>
328-
<properties>
329-
<gpg.executable>gpg</gpg.executable>
330-
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
331-
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
332-
<gpg.defaultKeyring>false</gpg.defaultKeyring>
333-
<gpg.publicKeyring>deploy/pubring.gpg</gpg.publicKeyring>
334-
<gpg.secretKeyring>deploy/secring.gpg</gpg.secretKeyring>
335-
</properties>
336-
<activation>
337-
<property>
338-
<name>performRelease</name>
339-
<value>true</value>
340-
</property>
341-
</activation>
342312
<build>
343313
<plugins>
344314
<plugin>
@@ -354,6 +324,12 @@
354324
</goals>
355325
</execution>
356326
</executions>
327+
<configuration>
328+
<gpgArguments>
329+
<arg>--pinentry-mode</arg>
330+
<arg>loopback</arg>
331+
</gpgArguments>
332+
</configuration>
357333
</plugin>
358334
<plugin>
359335
<groupId>org.sonatype.plugins</groupId>
@@ -362,17 +338,12 @@
362338
<extensions>true</extensions>
363339
<configuration>
364340
<serverId>ossrh</serverId>
365-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
341+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
366342
<autoReleaseAfterClose>true</autoReleaseAfterClose>
367343
</configuration>
368344
</plugin>
369-
<plugin>
370-
<groupId>org.apache.maven.plugins</groupId>
371-
<artifactId>maven-release-plugin</artifactId>
372-
<version>2.5.3</version>
373-
</plugin>
374345
</plugins>
375-
</build>
346+
</build>
376347
</profile>
377348
</profiles>
378349

0 commit comments

Comments
 (0)