-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.5 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Maven Build and Deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Set up Maven
uses: s4u/maven-settings-action@v2
with:
servers: '[{ "id": "your-repo-id", "username": "${{ secrets.MAVEN_USERNAME }}", "password": "${{ secrets.MAVEN_PASSWORD }}" }]'
- name: Configure GPG for Maven
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import
echo "default-key ${GPG_KEY_ID}" >> ~/.gnupg/gpg.conf
echo "use-agent" >> ~/.gnupg/gpg.conf
echo RELOADAGENT | gpg-connect-agent
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
- name: Build with Maven
run: mvn clean package -P release-sign-artifacts
- name: Deploy .lex file to Maven Repository
run: |
mvn deploy:deploy-file -DgroupId=org.lucee -DartifactId=kinesis-extension -Dversion=${{ github.sha }} -Dpackaging=lex -Dfile=target/kinesis-extension-${{ github.sha }}.lex -DrepositoryId=your-repo-id -Durl=https://your.repository.url/repo-path
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}