Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Commit

Permalink
Publish Action added
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsgi committed Jun 13, 2021
1 parent 55629d4 commit 829b248
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Maven Package

on:
release:
types: [ created ]

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

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

- name: Create Package
run: mvn -B package --file pom.xml

- name: Publish Package
run: mvn deploy -e -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Maven build
name: Maven Build

on:
push:
Expand All @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 15
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '15'
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.alexsgi</groupId>
<artifactId>network-tools</artifactId>
<version>1.2</version>
<version>1.3</version>
<packaging>jar</packaging>
<name>NetworkTools</name>

Expand All @@ -18,18 +18,18 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub alexsgi Apache Maven Packages</name>
<url>https://maven.pkg.github.com/alexsgi/network-tools</url>
</repository>
</distributionManagement>

</project>

0 comments on commit 829b248

Please sign in to comment.