Skip to content

Commit

Permalink
set pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Nov 2, 2020
1 parent 6541d5b commit 050cfd3
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 17 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
name: Maven Package

on:
release:
types: [created]
push:
branches:
- develop

jobs:
build:
Expand All @@ -18,13 +19,6 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
run: mvn -B install --file pom.xml -s settings-template.xml
7 changes: 0 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- SONATYPE REPO -->
<snapshot.repo.id>sonatype-repo</snapshot.repo.id>
<snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
<release.repo.id>sonatype-repo</release.repo.id>
<release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</release.repo.url>

</properties>
<modules>
<module>processor</module>
Expand Down
72 changes: 72 additions & 0 deletions settings-template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<!--
enabled Whether to use this repository for downloading this type
of artifact. updatePolicy The frequency for downloading updates - can be
"always", "daily" (default), "interval:XXX" (in minutes) or "never" (only
if it doesn't exist locally). checksumPolicy What to do when verification
of an artifact checksum fails - warn, fail, etc. Valid values are "fail"
or "warn".
-->
<servers>

<server>
<id>sonatype-server</id>
<username>bsorrentino</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>

</servers>

<profiles>

<profile>
<id>sonatype</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<repo.id>sonatype-server</repo.id>
<release.repo.url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repo.url>
<!--release.repo.url>http://oss.sonatype.org/content/repositories/releases</release.repo.url-->
<snapshot.repo.url>http://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
<group.repo.url>http://oss.sonatype.org/content/groups/public/</group.repo.url>
</properties>

<repositories>

<repository>
<id>${repo.id}</id>
<name>bitbucket snapshots</name>
<url>${snapshot.repo.url}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

</repositories>

<pluginRepositories>

<pluginRepository>
<id>${repo.id}</id>
<name>bitbucket snapshots</name>
<url>${snapshot.repo.url}</url>

<snapshots>
<updatePolicy>always</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</snapshots>

</pluginRepository>

</pluginRepositories>
</profile>

</profiles>

<proxies>
</proxies>

</settings>

0 comments on commit 050cfd3

Please sign in to comment.