Skip to content

Add workflow to publish to GitHub Packages #1

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish package to GitHub Packages

on:
push:
branches:
- main
pull_request:

jobs:
publish:
name: Publish package to GitHub Packages
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: "11"
java-package: jdk
architecture: x64

- name: Publish to Github Packages
# if: ${{ github.ref == 'refs/heads/main' }}
run: |
# temporarily removing unit tests from the process as a dependent package (pubsub-emulator) is unavailable
# -s settings.xml
mvn --batch-mode -DskipTests -Dentur.google.pubsub.emulator.download.skip=true deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion calendar-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion camel-entur-google-pubsub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/

<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion camel3-entur-google-pubsub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/

<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion entur-google-pubsub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion gcp-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hazelcast-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hazelcast4-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion oauth2/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project 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/maven-4.0.0.xsd">
<parent>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<groupId>org.entur.ror.helpers</groupId>
<version>1.89-SNAPSHOT</version>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion organisation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
19 changes: 9 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</parent>

<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<packaging>pom</packaging>

Expand Down Expand Up @@ -69,14 +69,14 @@

<distributionManagement>
<repository>
<id>central</id>
<name>entur2-releases</name>
<url>https://entur2.jfrog.io/entur2/libs-release-local</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/hsldevcom/jore4-tiamat-rutebanken-helpers</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>entur2-snapshots</name>
<url>https://entur2.jfrog.io/entur2/libs-snapshot-local</url>
<id>snapshot</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/hsldevcom/jore4-tiamat-rutebanken-helpers</url>
</snapshotRepository>
</distributionManagement>

Expand Down Expand Up @@ -189,18 +189,17 @@
</gitFlowConfig>
</configuration>
</plugin>
<plugin>
<!-- <plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- Set this to true and the release will automatically proceed and sync to Central Repository will follow -->
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugin> -->
</plugins>
</build>

Expand Down
32 changes: 32 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<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">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/hsldevcom/jore4-tiamat-rutebanken-helpers</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>pallost</username>
<password>${env.github-token}</password>
</server>
</servers>
</settings>
2 changes: 1 addition & 1 deletion slack/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Inspired by: https://github.com/fabric8io/ipaas-quickstarts/
<project 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/maven-4.0.0.xsd">
<parent>
<groupId>org.entur.ror.helpers</groupId>
<artifactId>helper</artifactId>
<artifactId>jore4-tiamat-rutebanken-helpers</artifactId>
<version>1.89-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down