This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
Merge pull request #32 from ralfkonrad/dependabot/maven/org.apache.ma… #128
This file contains 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: Build and sign for different runners | |
on: | |
push: { } | |
pull_request: { } | |
workflow_dispatch: { } | |
schedule: | |
- cron: '23 2 * * *' | |
env: | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
jobs: | |
build-and-sign: | |
name: "Build and sign with gpg-plugin v${{ matrix.gpg-plugin-version }}, ${{ matrix.os }}, jdk${{ matrix.java-version }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
java-version: | |
- 17 | |
#- 21 | |
os: | |
#- ubuntu-20.04 | |
- ubuntu-22.04 | |
#- macos-12 | |
- macos-13 | |
#- windows-2019 | |
- windows-2022 | |
gpg-plugin-version: | |
- "3.1.0" | |
# - "3.2.6" # disabled as it fails | |
- "3.2.7-SNAPSHOT" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup java" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: "temurin" | |
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
cache: maven | |
- name: "Check gpg setup" | |
shell: bash | |
run: | | |
gpg --version | |
gpg --list-keys | |
gpg --list-secret-keys | |
- name: "Check gpg setup on Linux" | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
which gpg | |
cat /home/runner/.m2/settings.xml | |
- name: "Check gpg setup on macOs" | |
if: runner.os == 'macOs' | |
shell: bash | |
run: | | |
which gpg | |
cat /Users/runner/.m2/settings.xml | |
- name: "Check gpg setup on Windows" | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: | | |
where.exe gpg | |
cat C:\Users\runneradmin\.m2\settings.xml | |
- name: "Set maven-gpg-plugin.version to v${{ matrix.gpg-plugin-version }}" | |
shell: bash | |
run: | | |
./mvnw --batch-mode --show-version versions:set-property -D "property=maven-gpg-plugin.version" -D "newVersion=${{ matrix.gpg-plugin-version }}" | |
- name: "Build and sign" | |
shell: bash | |
run: | | |
./mvnw --batch-mode --show-version clean verify |