Skip to content

Commit

Permalink
add maven deployment for the rest of the github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 20, 2024
1 parent 04f0a7a commit 69a90fe
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 9 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/main-5.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ jobs:
with:
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Build extension-s3 with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Build and Install with Maven
run: |
echo "------- Maven Install -------";
mvn -B -e -f pom.xml clean install
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: s3-lex
path: dist/*.lex
path: target/*.lex
- name: Checkout Lucee
uses: actions/checkout@v4
with:
Expand All @@ -53,7 +55,7 @@ jobs:
execute: /bootstrap-tests.cfm
luceeVersion: ${{ env.luceeVersion }}
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensionDir: ${{ github.workspace }}/dist
extensionDir: ${{ github.workspace }}/target
env:
testLabels: s3
testAdditional: ${{ github.workspace }}/tests
Expand All @@ -76,3 +78,36 @@ jobs:
S3_GOOGLE_SECRET_KEY: ${{ secrets.S3_GOOGLE_SECRET_KEY }}
S3_GOOGLE_HOST: storage.googleapis.com
S3_GOOGLE_BUCKET_PREFIX: lucee-ldev-e-
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Extract version number
id: extract-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Import GPG key
run: |
echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Build and Deploy with Maven
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [[ "$VERSION" == *-SNAPSHOT ]]; then
echo "------- Maven Deploy snapshot on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy --settings maven-settings.xml
else
echo "------- Maven Deploy release on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy -DperformRelease=true --settings maven-settings.xml
fi
45 changes: 40 additions & 5 deletions .github/workflows/main-6.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

runs-on: ubuntu-latest
env:
luceeVersion: light-5.4.2.4-SNAPSHOT
luceeVersion: light-6.0.3.1
luceeVersionQuery: 6.0/all/light
services:
minio:
Expand All @@ -34,13 +34,15 @@ jobs:
with:
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Build extension-s3 with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Build and Install with Maven
run: |
echo "------- Maven Install -------";
mvn -B -e -f pom.xml clean install
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: s3-lex
path: dist/*.lex
path: target/*.lex
- name: Checkout Lucee
uses: actions/checkout@v4
with:
Expand All @@ -53,7 +55,7 @@ jobs:
execute: /bootstrap-tests.cfm
luceeVersion: ${{ env.luceeVersion }}
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensionDir: ${{ github.workspace }}/dist
extensionDir: ${{ github.workspace }}/target
env:
testLabels: s3
testAdditional: ${{ github.workspace }}/tests
Expand All @@ -76,3 +78,36 @@ jobs:
S3_GOOGLE_SECRET_KEY: ${{ secrets.S3_GOOGLE_SECRET_KEY }}
S3_GOOGLE_HOST: storage.googleapis.com
S3_GOOGLE_BUCKET_PREFIX: lucee-ldev-e-
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Extract version number
id: extract-version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Import GPG key
run: |
echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Build and Deploy with Maven
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [[ "$VERSION" == *-SNAPSHOT ]]; then
echo "------- Maven Deploy snapshot on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy --settings maven-settings.xml
else
echo "------- Maven Deploy release on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy -DperformRelease=true --settings maven-settings.xml
fi

0 comments on commit 69a90fe

Please sign in to comment.