Skip to content

Commit

Permalink
Merge pull request #14 from patrickfav/feature/auto-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfav authored Feb 11, 2023
2 parents 8845384 + 4003f9a commit 0647a8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 41 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,21 @@ jobs:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Publish package
run: mvn -B deploy -DskipTests
run: |
./mvnw -B verify nexus-staging:deploy -P deploy && \
./mvnw -B nexus-staging:release -P deploy
env:
OPENSOURCE_PROJECTS_KS_PW: ${{ secrets.KEYSTORE_PASSWORD }}
OPENSOURCE_PROJECTS_KEY_PW: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Create and upload Github Release
uses: xresloader/upload-to-github-release@v1
env:
Expand Down
42 changes: 5 additions & 37 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>at.favre.lib</groupId>
<artifactId>common-parent</artifactId>
<version>15</version>
<version>18</version>
</parent>

<artifactId>hkdf</artifactId>
Expand All @@ -23,28 +23,6 @@
<url>https://github.com/patrickfav/hkdf</url>
<inceptionYear>2017</inceptionYear>

<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -121,7 +99,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -143,18 +120,9 @@
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<scm>
<connection>https://github.com/patrickfav/hkdf.git</connection>
<developerConnection>https://github.com/patrickfav/hkdf.git</developerConnection>
<tag>HEAD</tag>
<connection>scm:git:https://github.com/patrickfav/hkdf.git</connection>
<developerConnection>scm:git:https://github.com/patrickfav/hkdf.git</developerConnection>
<url>https://github.com/patrickfav/hkdf</url>
</scm>

Expand All @@ -164,7 +132,7 @@
</issueManagement>

<ciManagement>
<system>Travis</system>
<url>https://travis-ci.com/patrickfav/hkdf</url>
<system>Github Actions</system>
<url>https://github.com/patrickfav/hkdf/actions</url>
</ciManagement>
</project>

0 comments on commit 0647a8b

Please sign in to comment.