Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 19, 2024
1 parent 4d3bdaf commit c080c05
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,30 @@ jobs:
- 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
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.event.inputs.version }} -Dpackaging=lex -Dfile=target/kinesis-extension-${{ github.event.inputs.version }}.lex -DrepositoryId=your-repo-id -Durl=https://your.repository.url/repo-path
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 }}
35 changes: 35 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,41 @@
<bundleversion>1.0.0.79</bundleversion>
</properties>

<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<!-- GPG sign -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>

<build>
<plugins>
<!-- Antrun plugin to execute the Ant build -->
Expand Down

0 comments on commit c080c05

Please sign in to comment.