-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated to use JAVA 17 and updated Abstarct connection provider * Updated properties provider to override the namespace in secret path * Updated namespace logic with the pattern matching using regex * chore: build and formatting * deps: ugprade bc dep * chore: add ssl folder --------- Co-authored-by: Anil Konakalla <[email protected]> Co-authored-by: Anil Konakalla <[email protected]>
- Loading branch information
1 parent
c1cdfd7
commit 2054f50
Showing
51 changed files
with
2,434 additions
and
2,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,141 +1,47 @@ | ||
name: Build and Publish | ||
name: Maven Build and Release for Mule-Plugin | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'chore/**' | ||
- 'feat/**' | ||
- 'develop' | ||
- 'fix/**' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'main' | ||
|
||
jobs: | ||
Build-and-Publish: | ||
runs-on: ubuntu-latest | ||
env: | ||
MULE_EE_USERNAME: ${{ secrets.MULE_EE_USERNAME }} | ||
MULE_EE_PASSWORD: ${{ secrets.MULE_EE_PASSWORD }} | ||
|
||
outputs: | ||
version: ${{ steps.set-version.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
submodules: 'recursive' | ||
|
||
- name: Set up JDK 1.8 for build and unit test | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 8 | ||
cache: maven | ||
server-id: mulesoft-ee-releases | ||
server-username: MULE_EE_USERNAME | ||
server-password: MULE_EE_PASSWORD | ||
|
||
- name: Set Version | ||
id: set-version | ||
run: echo version=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) >> $GITHUB_OUTPUT | ||
|
||
- name: Print Version | ||
run: echo "Version ${{ steps.set-version.outputs.version }}" | ||
|
||
- name: Compile | ||
run: ./mvnw compile | ||
|
||
- name: Verify | ||
run: ./mvnw --batch-mode verify | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
files: | | ||
target/surefire-reports/*.xml | ||
- name: Set up JDK 1.8 for maven central publish | ||
uses: actions/setup-java@v3 | ||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master'}} | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 8 | ||
cache: maven | ||
server-id: ossrh | ||
server-username: OSSRH_USERNAME | ||
server-password: OSSRH_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Publish to Maven Central | ||
id: publish-to-maven-central | ||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master'}} | ||
run: ./mvnw deploy -Drelease=true -DskipTests=true | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
- name: JReleaser full-Release | ||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master'}} | ||
uses: jreleaser/release-action@v2 | ||
env: | ||
JRELEASER_PROJECT_VERSION: ${{steps.set-version.outputs.version}} | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | ||
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} | ||
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} | ||
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} | ||
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
JRELEASER_VERSION: 1.6.0 | ||
with: | ||
version: ${{ env.JRELEASER_VERSION }} | ||
arguments: full-release | ||
|
||
- name: JReleaser release output | ||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master'}} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: jreleaser-release | ||
path: | | ||
out/jreleaser/trace.log | ||
out/jreleaser/output.properties | ||
Perform-Release: | ||
runs-on: ubuntu-latest | ||
needs: Build-and-Publish | ||
if: ${{ !contains(needs.Build-and-Publish.outputs.version, 'SNAPSHOT') && github.event_name != 'pull_request' && github.ref == 'refs/heads/master'}} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
submodules: 'recursive' | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 8 | ||
cache: maven | ||
|
||
- name: Increment Version | ||
run: | | ||
./mvnw clean build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT -DprocessAllModules versions:commit | ||
- name: Set New Version Variable | ||
id: set-new-version | ||
run: echo version=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) >> $GITHUB_OUTPUT | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
branch: "chore/v${{ steps.set-new-version.outputs.version }}" | ||
commit-message: "chore: [create-pull-request] Auto increment to v${{ steps.set-new-version.outputs.version }}" | ||
title: "chore: Auto increment to v${{ steps.set-new-version.outputs.version }}" | ||
delete-branch: true | ||
assignees: ${{ github.actor }} | ||
reviewers: adesjardin, manikmagar, kkingavio | ||
Build-Maven: | ||
uses: avioconsulting/shared-workflows/.github/workflows/maven-build.yml@main | ||
secrets: inherit | ||
with: | ||
include-mule-ee-repo: true | ||
# java-distribution: adopt-hotspot | ||
# java-version: 8 | ||
# include-test-results: true | ||
# maven-args: -X | ||
|
||
Release-Maven: | ||
needs: Build-Maven | ||
uses: avioconsulting/shared-workflows/.github/workflows/maven-release.yml@main | ||
secrets: inherit | ||
with: | ||
app-version: ${{ needs.Build-Maven.outputs.app-version }} | ||
publish-maven-central: true | ||
# java-distribution: adopt-hotspot | ||
# java-version: 8 | ||
# maven-args: -X | ||
# main-branch: main | ||
|
||
Post-Release-Maven: | ||
needs: [Build-Maven, Release-Maven] | ||
uses: avioconsulting/shared-workflows/.github/workflows/maven-post-release.yml@main | ||
secrets: inherit | ||
with: | ||
app-version: ${{ needs.Build-Maven.outputs.app-version }} | ||
# java-distribution: adopt-hotspot | ||
# java-version: 8 | ||
# maven-args: -X | ||
# main-branch: main | ||
# pr-reviewers: adesjardin, manikmagar, kkingavio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.