Skip to content

Commit

Permalink
package-info.java added everywhere, new publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Majekdor committed Oct 15, 2021
1 parent a388dcc commit d63db79
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/maven.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: build
name: build project

on:
push:
Expand All @@ -17,11 +14,11 @@ jobs:
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: setup JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
- name: build with maven
run: mvn -B package --file pom.xml
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish to majek-repo

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: setup JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: majek-repo
settings-path: ${{ github.workspace }}

- name: build with maven
run: mvn -B package --file pom.xml

- name: publish to majek-repo
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
13 changes: 13 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<!-- Id has to match the id provided in pom.xml -->
<id>majek-repo</id>
<username>${{ secrets.MAVEN_USERNAME }}</username>
<password>${{ secrets.MAVEN_PASSWORD }}</password>
</server>
</servers>
</settings>
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/api/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* HexNicks Api. Includes api class and events.
*/
package dev.majek.hexnicks.api;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/command/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Plugin commands.
*/
package dev.majek.hexnicks.command;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/config/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Configuration for the plugin including Json and SQL configuration managers.
*/
package dev.majek.hexnicks.config;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/event/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Plugin listeners.
*/
package dev.majek.hexnicks.event;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/hook/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Other plugin hooks.
*/
package dev.majek.hexnicks.hook;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Main HexNicks class.
*/
package dev.majek.hexnicks;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/server/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Server implementation (Spigot or Paper).
*/
package dev.majek.hexnicks.server;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/storage/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Nickname storage (Json or SQL).
*/
package dev.majek.hexnicks.storage;
4 changes: 4 additions & 0 deletions src/main/java/dev/majek/hexnicks/util/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* General utilities.
*/
package dev.majek.hexnicks.util;

0 comments on commit d63db79

Please sign in to comment.