Skip to content

Commit

Permalink
Merge pull request #11 from microsphere-projects/dev-1.x
Browse files Browse the repository at this point in the history
To release 0.0.2
  • Loading branch information
mercyblitz authored Aug 17, 2024
2 parents e917564 + 18b8a20 commit 8f830ae
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 37 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Maven Build

on:
push:
branches: [ 'dev-1.x' ]
pull_request:
branches: [ 'release-1.x' ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' , '17' , '21' ]
maven-profile-spring-boot: [ 'spring-boot-2.4' , 'spring-boot-2.5' , 'spring-boot-2.6' , 'spring-boot-2.7' ]
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Setup JDK ${{ matrix.Java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven

- name: Build with Maven
run: mvn
--batch-mode
--update-snapshots
--file pom.xml
-Drevision=0.0.1-SNAPSHOT
-DargLine="${{ matrix.java >= 16 && '--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED' || '' }}"
-P${{ matrix.maven-profile-spring-boot }}
test
46 changes: 46 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Maven Publish

on:
push:
branches: [ 'release-1.x' ]
workflow_dispatch:
inputs:
revision:
description: 'The version to publish'
required: true
default: '0.0.1-SNAPSHOT'

jobs:
build:
runs-on: ubuntu-latest
if: ${{ inputs.revision }}
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Setup Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
cache: maven

- name: Publish package
run: mvn --batch-mode --update-snapshots -Drevision=${{ inputs.revision }} -Dgpg.skip=true -Prelease,ci clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
SIGN_KEY_ID: ${{ secrets.OSS_SIGNING_KEY_ID_LONG }}
SIGN_KEY: ${{ secrets.OSS_SIGNING_KEY }}
SIGN_KEY_PASS: ${{ secrets.OSS_SIGNING_PASSWORD }}
31 changes: 0 additions & 31 deletions .github/workflows/maven.yml

This file was deleted.

46 changes: 41 additions & 5 deletions microsphere-spring-boot-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<properties>
<spring-boot.version>2.7.18</spring-boot.version>
<microsphere-spring.version>${revision}</microsphere-spring.version>
<microsphere-spring.version>0.0.3</microsphere-spring.version>
</properties>

<dependencyManagement>
Expand All @@ -47,16 +47,30 @@

<profiles>
<profile>
<id>spring-boot-2.6</id>
<id>spring-boot-2.0</id>
<properties>
<spring-boot.version>2.6.16</spring-boot.version>
<spring-boot.version>2.0.9.RELEASE</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.5</id>
<id>spring-boot-2.1</id>
<properties>
<spring-boot.version>2.1.18.RELEASE</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.2</id>
<properties>
<spring-boot.version>2.5.14</spring-boot.version>
<spring-boot.version>2.2.13.RELEASE</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.3</id>
<properties>
<spring-boot.version>2.3.12.RELEASE</spring-boot.version>
</properties>
</profile>

Expand All @@ -66,5 +80,27 @@
<spring-boot.version>2.4.13</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.5</id>
<properties>
<spring-boot.version>2.5.15</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.6</id>
<properties>
<spring-boot.version>2.6.15</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-2.7</id>
<properties>
<spring-boot.version>2.7.18</spring-boot.version>
</properties>
</profile>

</profiles>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</scm>

<properties>
<revision>0.0.1</revision>
<revision>0.0.2</revision>
</properties>

<modules>
Expand Down

0 comments on commit 8f830ae

Please sign in to comment.