Release v1.0.10 #12
Workflow file for this run
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: Release | |
| run-name: Release ${{ github.ref_name }} | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]*' | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v7 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Test GPG key expiry | |
| run: | | |
| EXPIRY=$(gpg --list-keys | egrep -o "expires:\s+[0-9-]+" | egrep -o "[0-9-]+" | sort | head -n 1) | |
| echo "GPG key expires on ${EXPIRY}" | |
| DELTA=$(( $(date --date "${EXPIRY}" '+%s') - $(date '+%s') )) | |
| echo "GPG key expires in ${DELTA} seconds" | |
| [[ ${DELTA} -ge 600 ]] | |
| - name: Check out from SCM | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK/Maven | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| - name: Configure Maven settings | |
| uses: whelk-io/maven-settings-xml-action@v22 | |
| with: | |
| servers: >- | |
| [{ | |
| "id": "central.sonatype.org", | |
| "username": "${{ secrets.MAVEN_CENTRAL_USER }}", | |
| "password": "${{ secrets.MAVEN_CENTRAL_PASSWORD }}" | |
| }] | |
| - name: Deploy artifacts | |
| env: | |
| AUTO_RELEASE: ${{ vars.AUTO_RELEASE }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| run: >- | |
| mvn | |
| --batch-mode | |
| --activate-profiles=release,-examples | |
| --define=gpg.useagent=false | |
| --define=repoBaseUrl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} | |
| deploy |