Skip to content

Commit

Permalink
Deploy this Pregrine fork to GitHub packages.
Browse files Browse the repository at this point in the history
To be picked up later by the sling-starter https://github.com/orx0815/slimpogrine
  • Loading branch information
orx0815 committed Jul 31, 2024
1 parent f00132a commit baf0c09
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy-to-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Deploy to maven.pkg.github.com

on:
workflow_dispatch:

jobs:
build:

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

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
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 }}
15 changes: 9 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@
<sourceReleaseAssemblyDescriptor>source-release</sourceReleaseAssemblyDescriptor>

<organization.logo>http://www.peregrine-cms.com/peregrine-logo.png</organization.logo>
<repositoryName>Peregrine Release Distribution Repository</repositoryName>
<repositoryUrl>https://oss.sonatype.org/service/local/staging/deploy/maven2</repositoryUrl>
<snapshotRepositoryName>Peregrine CMS Development Snapshot Repository</snapshotRepositoryName>
<snapshotRepositoryUrl>https://oss.sonatype.org/content/repositories/snapshots</snapshotRepositoryUrl>

<!-- also in themes/themeclean/pom.xml -->
<repositoryName>orx0815 Peregrine Release Distribution Repository</repositoryName>
<repositoryUrl>https://maven.pkg.github.com/orx0815/peregrine-cms</repositoryUrl>
<snapshotRepositoryName>orx0815 Peregrine CMS Development Snapshot Repository</snapshotRepositoryName>
<snapshotRepositoryUrl>https://maven.pkg.github.com/orx0815/peregrine-cms</snapshotRepositoryUrl>

<gpg.useagent>true</gpg.useagent>

<noContent>true</noContent>
Expand Down Expand Up @@ -1034,12 +1037,12 @@

<distributionManagement>
<repository>
<id>peregrine.releases.https</id>
<id>github</id>
<name>${repositoryName}</name>
<url>${repositoryUrl}</url>
</repository>
<snapshotRepository>
<id>peregrine.snapshots.https</id>
<id>github</id>
<name>${snapshotRepositoryName}</name>
<url>${snapshotRepositoryUrl}</url>
</snapshotRepository>
Expand Down
20 changes: 20 additions & 0 deletions themes/themeclean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@

<!-- define archetype tooling version in a central place -->
<archetype.version>2.2</archetype.version>

<!-- also in root/pom.xml -->
<repositoryName>Peregrine orx0815-fork Release Distribution Repository</repositoryName>
<repositoryUrl>https://maven.pkg.github.com/orx0815/peregrine-cms</repositoryUrl>
<snapshotRepositoryName>Peregrine orx0815-fork CMS Development Snapshot Repository</snapshotRepositoryName>
<snapshotRepositoryUrl>https://maven.pkg.github.com/orx0815/peregrine-cms</snapshotRepositoryUrl>

</properties>

Expand Down Expand Up @@ -436,4 +442,18 @@
<module>core</module>
<module>ui.apps</module>
</modules>

<distributionManagement>
<repository>
<id>github</id>
<name>${repositoryName}</name>
<url>${repositoryUrl}</url>
</repository>
<snapshotRepository>
<id>github</id>
<name>${snapshotRepositoryName}</name>
<url>${snapshotRepositoryUrl}</url>
</snapshotRepository>
</distributionManagement>

</project>

0 comments on commit baf0c09

Please sign in to comment.