Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven publishing test #62

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5e4eeb9
Update Maven publishin
JesseMckinzie Feb 12, 2024
e77c4c3
Update publish_maven.yml
JesseMckinzie Feb 12, 2024
b35c0b6
Update publish_maven.yml
JesseMckinzie Feb 12, 2024
4b25397
Update pom.xml
JesseMckinzie Feb 13, 2024
d37025b
Update pom.xml
JesseMckinzie Feb 13, 2024
cdb2c2b
Update pom.xml
JesseMckinzie Feb 13, 2024
e77ba38
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
fc7aee1
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
d05fb75
Update maven publishing
JesseMckinzie Feb 13, 2024
80437b6
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
7f22d17
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
1f6beb4
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
6028dcd
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
bbe0889
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
85e7a14
Update pom.xml
JesseMckinzie Feb 13, 2024
50af24d
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
f3d8af4
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
c65b107
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
b6d269e
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
18e9e32
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
954ea6e
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
63e0670
Test SNAPSHOT version
JesseMckinzie Feb 13, 2024
402c42e
Merge branch 'master' into maven_publishing
JesseMckinzie Feb 13, 2024
4aa8dd3
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
294d0c9
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
ab35f6b
Change maven publishing
JesseMckinzie Feb 13, 2024
c5acdcc
Update pom.xml
JesseMckinzie Feb 13, 2024
2d6b29e
Merge branch 'maven_publishing_v2' into maven_publishing
JesseMckinzie Feb 13, 2024
d4bed7e
Update pom.xml
JesseMckinzie Feb 13, 2024
cbf8d35
Update publish_maven.yml
JesseMckinzie Feb 13, 2024
c8ab01d
Update pom.xml
JesseMckinzie Feb 13, 2024
a46dff4
Create settings.xml
JesseMckinzie Feb 13, 2024
599736a
Update pom.xml
JesseMckinzie Feb 13, 2024
64e1dc0
Update pom.xml
JesseMckinzie Feb 14, 2024
93fb762
Update pom.xml
JesseMckinzie Feb 14, 2024
4a7fe37
Delete settings.xml
JesseMckinzie Feb 14, 2024
aafdf9c
Update publish_maven.yml
JesseMckinzie Feb 14, 2024
bacf653
Update maven publishing
JesseMckinzie Feb 14, 2024
a2e0d40
Update
JesseMckinzie Feb 14, 2024
c1518bf
Merge branch 'maven_publishing_v2' into maven_publishing
JesseMckinzie Feb 14, 2024
fa51655
Update README.md
JesseMckinzie Feb 22, 2024
275e15d
Update README.md
JesseMckinzie Feb 22, 2024
efa0e37
Update README.md
JesseMckinzie Feb 22, 2024
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
24 changes: 14 additions & 10 deletions .github/workflows/publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types: [published]
workflow_dispatch:
pull_request:

jobs:
publish:
Expand All @@ -16,15 +17,18 @@ jobs:
java-version: 11
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: build artifact
run: mvn -B package --file pom.xml -DskipTests
- name: Publish package
run: mvn --batch-mode deploy -X
server-username: MAVEN_USERNAME # Env var that holds your OSSRH user name
server-password: MAVEN_PASSWORD # Env var that holds your OSSRH user pw
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
cache: 'maven'
- name: Build & Deploy
run: |
# -U force updates just to make sure we are using latest dependencies
# -B Batch mode (do not ask for user input), just in case
# -P activate profile
mvn -U -B clean deploy -P release -e -X
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Filepattern
# Filepattern

[![Documentation Status](https://readthedocs.org/projects/filepattern/badge/?version=latest)](https://filepattern.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/filepattern)](https://pypi.org/project/filepattern/)
Expand Down
127 changes: 119 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@

<groupId>ai.polus.utils</groupId>
<artifactId>filepattern</artifactId>
<version>2.0.5</version>
<version>2.0.4-SNAPSHOT</version>

<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<scm>
<url>https://github.com/JesseMckinzie/filepattern-1.git</url>
<connection>scm:git:https://github.com/JesseMckinzie/filepattern-1.git</connection>
<developerConnection>scm:git:https://github.com/JesseMckinzie/filepattern-1.git</developerConnection>
<tag>HEAD</tag>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>

Expand Down Expand Up @@ -48,6 +58,20 @@
<testSourceDirectory>tests/java</testSourceDirectory>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -116,5 +140,92 @@

</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<properties>
<version.maven-release-plugin>3.0.0-M7</version.maven-release-plugin>
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
<version.nexus-staging-maven-plugin>1.6.13</version.nexus-staging-maven-plugin>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>${version.maven-release-plugin}</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>${version.maven-gpg-plugin}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.3.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
10 changes: 10 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<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 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>central</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>
Loading