Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven and Deploy

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11 for Maven Central
uses: actions/setup-java@v1
with:
java-version: '11'
architecture: x64
server-id: ossrh
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Publish to Maven Central
run: mvn deploy
env:
MAVEN_USERNAME: hap-java-dev
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish site
run: mvn deploy-site
2 changes: 0 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Stage Release on Master Branch

on:
workflow_dispatch:
inputs:
releaseVersion:
description: Version to release
required: true

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
architecture: x64
server-id: ossrh
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Setup git profile
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Maven release
run: mvn release:prepare release:perform -B -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -Possrh
env:
MAVEN_USERNAME: hap-java-dev
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
HAP-Java
=========
[![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)
[![MIT License](https://img.shields.io/github/license/hap-java/HAP-Java)](https://github.com/hap-java/HAP-Java/blob/master/LICENSE)
![Maven Build Status](https://github.com/andylintner/HAP-Java/actions/workflows/maven.yml/badge.svg)

HAP-Java is a Java implementation of the HomeKit Accessory Protocol.

Using this library, you can create your own HomeKit Accessory or HomeKit Accessory Bridge.
Expand Down
7 changes: 7 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# How to release HAP-Java

These actions can only be performed by someone with maintainer level access to the repository.

1. Run the [Stage Release on Master Branch](https://github.com/hap-java/HAP-Java/actions/workflows/release.yml) Action
2. After this completes, find the release on the [Releases page](https://github.com/hap-java/HAP-Java/releases)
3. Edit the release to include the changelog details
18 changes: 0 additions & 18 deletions deploy/distribution.xml

This file was deleted.

5 changes: 0 additions & 5 deletions deploy/publish.sh

This file was deleted.

Binary file removed deploy/pubring.gpg.enc
Binary file not shown.
Binary file removed deploy/secring.gpg.enc
Binary file not shown.
9 changes: 0 additions & 9 deletions deploy/settings.xml

This file was deleted.

57 changes: 14 additions & 43 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<scm>
<connection>scm:git:https://github.com/hap-java/HAP-Java.git</connection>
<developerConnection>scm:git:git@github.com:hap-java/HAP-Java.git</developerConnection>
<developerConnection>scm:git:https://github.com/hap-java/HAP-Java.git</developerConnection>
<url>https://github.com/hap-java/HAP-Java.git</url>
<tag>HEAD</tag>
</scm>
Expand Down Expand Up @@ -208,24 +208,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<descriptors>
<descriptor>deploy/distribution.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
Expand All @@ -238,7 +220,7 @@
<goal>publish-scm</goal>
</goals>
<configuration>
<pubScmUrl>scm:git:git@github.com:hap-java/HAP-Java.git</pubScmUrl>
<pubScmUrl>scm:git:https://github.com/hap-java/HAP-Java.git</pubScmUrl>
<scmBranch>gh-pages</scmBranch>
</configuration>
</execution>
Expand Down Expand Up @@ -284,11 +266,11 @@
</site>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

Expand All @@ -305,6 +287,8 @@
<version>3.0.1</version>
<configuration>
<excludePackageNames>io.github.hapjava.server.impl</excludePackageNames>
<source>8</source>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
<reportSets>
<reportSet>
Expand All @@ -325,20 +309,6 @@
<profiles>
<profile>
<id>ossrh</id>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
<gpg.defaultKeyring>false</gpg.defaultKeyring>
<gpg.publicKeyring>deploy/pubring.gpg</gpg.publicKeyring>
<gpg.secretKeyring>deploy/secring.gpg</gpg.secretKeyring>
</properties>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
Expand All @@ -354,6 +324,12 @@
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
Expand All @@ -362,17 +338,12 @@
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</build>
</build>
</profile>
</profiles>

Expand Down