GH-18 - Add GitHub actions workflows for releases.
This commit is contained in:
8
.github/workflows/build.yaml
vendored
8
.github/workflows/build.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Maven Build
|
||||
name: CI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -31,3 +31,9 @@ jobs:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pci,artifactory
|
||||
|
||||
- name: Deploy documentation
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pdocumentation
|
||||
|
||||
28
.github/workflows/docs.yaml
vendored
Normal file
28
.github/workflows/docs.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Publish Documentation
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Publish documentation
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
cache: 'maven'
|
||||
|
||||
- name: Deploy documentation
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pdocumentation
|
||||
40
.github/workflows/milestone.yaml
vendored
Normal file
40
.github/workflows/milestone.yaml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Release Milestones
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release/milestone ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Release project
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
cache: 'maven'
|
||||
|
||||
- name: Build with Maven
|
||||
run: ./mvnw -B
|
||||
|
||||
- name: Deploy to Artifactory
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pci,artifactory
|
||||
|
||||
- name: Setup Graphviz
|
||||
uses: ts-graphviz/setup-graphviz@v1
|
||||
|
||||
- name: Deploy documentation
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pdocumentation
|
||||
41
.github/workflows/release.yaml
vendored
Normal file
41
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Release to Maven Central
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release/release ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Release project
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
cache: 'maven'
|
||||
|
||||
- name: Install GPG key
|
||||
run: |
|
||||
echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg.asc
|
||||
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
|
||||
|
||||
- name: Release to Sonatype OSSRH
|
||||
env:
|
||||
SONATYPE_USER: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
|
||||
SONATYPE_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
|
||||
run: |
|
||||
./mvnw -B clean install -DskipTests
|
||||
./mvnw -B clean deploy -Psonatype -s settings.xml -Dgpg.passphrase='${{ secrets.GPG_PASSPHRASE }}'
|
||||
|
||||
- name: Deploy documentation
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B clean deploy -Pdocumentation
|
||||
46
pom.xml
46
pom.xml
@@ -194,6 +194,7 @@ limitations under the License.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
@@ -214,6 +215,51 @@ limitations under the License.
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>documentation</id>
|
||||
<properties>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jfrog.buildinfo</groupId>
|
||||
<artifactId>artifactory-maven-plugin</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<inherited>false</inherited>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>deploy-docs-to-artifactory</id>
|
||||
<goals>
|
||||
<goal>publish</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<publisher>
|
||||
<contextUrl>https://repo.spring.io</contextUrl>
|
||||
<includePatterns>*-docs.zip</includePatterns>
|
||||
<username>${env.ARTIFACTORY_USERNAME}</username>
|
||||
<password>${env.ARTIFACTORY_PASSWORD}</password>
|
||||
<repoKey>temp-private-local</repoKey>
|
||||
<snapshotRepoKey>temp-private-local</snapshotRepoKey>
|
||||
</publisher>
|
||||
<buildInfo>
|
||||
<buildName>Documentation build for Spring Modulith ${project.version}</buildName>
|
||||
<buildRetentionCount>1</buildRetentionCount>
|
||||
</buildInfo>
|
||||
<deployProperties>
|
||||
<zip.name>spring-modulith-docs</zip.name>
|
||||
<zip.displayname>spring-modulith-docs</zip.displayname>
|
||||
<zip.deployed>false</zip.deployed>
|
||||
<zip.type>docs</zip.type>
|
||||
</deployProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
12
settings.xml
Normal file
12
settings.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<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">
|
||||
|
||||
<servers>
|
||||
<server>
|
||||
<id>sonatype-new</id>
|
||||
<username>${env.SONATYPE_USER}</username>
|
||||
<password>${env.SONATYPE_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
||||
Reference in New Issue
Block a user