Update README.md #21
This file contains hidden or 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
name: Spring Web Captor CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: ["main"] | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
- name: Import GPG key | |
run: | | |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
# Enable loopback pinentry mode | |
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
echo "use-agent" >> ~/.gnupg/gpg.conf | |
gpgconf --kill gpg-agent | |
gpgconf --launch gpg-agent | |
- name: Build and Sign with Maven | |
run: mvn -B clean verify -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -Dgpg.keyname="${{ secrets.GPG_KEYNAME }}" | |
- name: Upload JARs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: spring-web-captor-jars | |
path: | | |
spring-web-captor/target/*.jar | |
spring-web-captor-xml/target/*.jar |