Skip to content

Commit 4bb8696

Browse files
authored
Merge pull request #3 from cicirello/development
Updates related to publishing to GitHub Package Registry
2 parents 19d298f + d6cf536 commit 4bb8696

File tree

4 files changed

+221
-1
lines changed

4 files changed

+221
-1
lines changed

.github/workflows/maven-publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
3+
4+
name: Maven Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
22+
settings-path: ${{ github.workspace }} # location for the settings.xml file
23+
24+
- name: Build with Maven
25+
run: mvn -B package --file pom.xml
26+
27+
- name: Update version
28+
run: mvn versions:set -DnewVersion=${GITHUB_REF:11}
29+
30+
- name: Publish to GitHub Packages Apache Maven
31+
run: mvn deploy -s ${{ github.workspace }}/settings.xml
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.m2/settings.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<activeProfiles>
7+
<activeProfile>github</activeProfile>
8+
</activeProfiles>
9+
10+
<profiles>
11+
<profile>
12+
<id>github</id>
13+
<repositories>
14+
<repository>
15+
<id>github</id>
16+
<name>GitHub cicirello Apache Maven Packages</name>
17+
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
18+
</repository>
19+
</repositories>
20+
</profile>
21+
</profiles>
22+
23+
<servers>
24+
<server>
25+
<id>github</id>
26+
<username>${env.GITHUB_ACTOR}</username>
27+
<password>${env.GITHUB_TOKEN}</password>
28+
</server>
29+
</servers>
30+
</settings>

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ https://www.cicirello.org/
88
[![DOI](https://zenodo.org/badge/139182095.svg)](https://zenodo.org/badge/latestdoi/139182095)
99
![build](https://github.com/cicirello/JavaPermutationTools/workflows/build/badge.svg)
1010
![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)
11-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools)
11+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/releases)
1212

1313
## How to Cite
1414

pom.xml

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
4+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.cicirello</groupId>
8+
<artifactId>jpt</artifactId>
9+
<version>2.0.1</version>
10+
11+
<dependencies>
12+
<dependency>
13+
<groupId>junit</groupId>
14+
<artifactId>junit</artifactId>
15+
<version>4.12</version>
16+
<type>jar</type>
17+
<scope>test</scope>
18+
<optional>true</optional>
19+
</dependency>
20+
</dependencies>
21+
22+
<properties>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
<maven.compiler.source>1.8</maven.compiler.source>
25+
<maven.compiler.target>1.8</maven.compiler.target>
26+
</properties>
27+
28+
<build>
29+
<directory>${project.basedir}/dist</directory>
30+
<outputDirectory>${project.basedir}/bin</outputDirectory>
31+
<finalName>${project.artifactId}-${project.version}</finalName>
32+
<testOutputDirectory>${project.basedir}/testbin</testOutputDirectory>
33+
<sourceDirectory>${project.basedir}/src</sourceDirectory>
34+
<scriptSourceDirectory>${project.basedir}/src/scripts</scriptSourceDirectory>
35+
<testSourceDirectory>${project.basedir}/tests</testSourceDirectory>
36+
<resources>
37+
<resource>
38+
<directory>${project.basedir}/src/resources</directory>
39+
</resource>
40+
</resources>
41+
<testResources>
42+
<testResource>
43+
<directory>${project.basedir}/tests/resources</directory>
44+
</testResource>
45+
</testResources>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-source-plugin</artifactId>
50+
<version>3.2.0</version>
51+
<executions>
52+
<execution>
53+
<id>attach-sources</id>
54+
<goals>
55+
<goal>jar</goal>
56+
</goals>
57+
</execution>
58+
</executions>
59+
</plugin>
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-javadoc-plugin</artifactId>
63+
<version>3.2.0</version>
64+
<executions>
65+
<execution>
66+
<id>attach-javadocs</id>
67+
<goals>
68+
<goal>jar</goal>
69+
</goals>
70+
</execution>
71+
</executions>
72+
<configuration>
73+
<windowtitle>JavaPermutationTools - A Java API for computation on permutations</windowtitle>
74+
<doctitle>JavaPermutationTools - A Java API for computation on permutations</doctitle>
75+
<author>false</author>
76+
<version>false</version>
77+
<overview>${project.build.sourceDirectory}/overview.html</overview>
78+
<notimestamp>true</notimestamp>
79+
<links>
80+
<link>https://docs.oracle.com/javase/8/docs/api</link>
81+
</links>
82+
<bottom><![CDATA[Copyright &copy; 2005-2020 <a href=\"https://www.cicirello.org/\" target=_top>Vincent A. Cicirello</a>. All rights reserved.]]></bottom>
83+
</configuration>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-surefire-plugin</artifactId>
88+
<version>3.0.0-M5</version>
89+
<configuration>
90+
<includes>
91+
<include>**/*TestCases.java</include>
92+
</includes>
93+
</configuration>
94+
</plugin>
95+
</plugins>
96+
</build>
97+
98+
<reporting>
99+
<plugins>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-javadoc-plugin</artifactId>
103+
<version>3.2.0</version>
104+
<configuration>
105+
<reportOutputDirectory>${project.basedir}/docs/api</reportOutputDirectory>
106+
<destDir>api</destDir>
107+
<outputDirectory>${project.basedir}/docs/api</outputDirectory>
108+
<windowtitle>JavaPermutationTools - A Java API for computation on permutations</windowtitle>
109+
<doctitle>JavaPermutationTools - A Java API for computation on permutations</doctitle>
110+
<author>false</author>
111+
<version>false</version>
112+
<overview>${project.build.sourceDirectory}/overview.html</overview>
113+
<notimestamp>true</notimestamp>
114+
<links>
115+
<link>https://docs.oracle.com/javase/8/docs/api</link>
116+
</links>
117+
<bottom><![CDATA[Copyright &copy; 2005-2020 <a href=\"https://www.cicirello.org/\" target=_top>Vincent A. Cicirello</a>. All rights reserved.]]></bottom>
118+
</configuration>
119+
</plugin>
120+
</plugins>
121+
</reporting>
122+
123+
<distributionManagement>
124+
<repository>
125+
<id>github</id>
126+
<name>GitHub cicirello Apache Maven Packages</name>
127+
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
128+
</repository>
129+
</distributionManagement>
130+
131+
<name>JavaPermutationTools</name>
132+
<description>JavaPermutationTools (JPT) is a library for
133+
computation on permutations and sequences.</description>
134+
<url>https://jpt.cicirello.org/</url>
135+
<licenses>
136+
<license>
137+
<name>GNU General Public License, Version 3.0</name>
138+
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
139+
<distribution>repo</distribution>
140+
</license>
141+
</licenses>
142+
<organization>
143+
<name>Vincent A. Cicirello</name>
144+
<url>https://www.cicirello.org/</url>
145+
</organization>
146+
<developers>
147+
<developer>
148+
<name>Vincent A. Cicirello</name>
149+
<url>https://www.cicirello.org/</url>
150+
</developer>
151+
</developers>
152+
153+
<issueManagement>
154+
<system>github</system>
155+
<url>https://github.com/cicirello/JavaPermutationTools/issues</url>
156+
</issueManagement>
157+
</project>

0 commit comments

Comments
 (0)