update sign key #28
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: build | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| paths-ignore: | |
| - 'LICENSE' | |
| - 'README.adoc' | |
| - 'docs/**' | |
| tags-ignore: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| version: | |
| name: prepare build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| BUILD_VERSION: ${{ env.BUILD_VERSION }} | |
| MAVEN_HOME: ${{ env.MAVEN_HOME }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: extract version | |
| run: | | |
| version=`yq -p xml -oy e '.project.version' pom.xml` | |
| echo "BUILD_VERSION=${version#projectVersion=}" >> $GITHUB_ENV | |
| cat $GITHUB_ENV | |
| - name: find maven home | |
| run: | | |
| maven_home=`./mvnw --version | sed -n '2p' | yq e '.["Maven home"]'` | |
| echo "MAVEN_HOME=${maven_home}" >> $GITHUB_ENV | |
| cat $GITHUB_ENV | |
| - name: actor | |
| run: echo ${{ github.actor }} ${{ github.actor == 'hauner' }} | |
| test: | |
| name: test | |
| needs: [version] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: set up jdk | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 11 | |
| cache: maven | |
| - name: run tests | |
| run: | | |
| ./mvnw --no-transfer-progress verify -D"maven.home=${{ needs.version.outputs.MAVEN_HOME }}" | |
| - name: archive test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: 'target/**' | |
| publish: | |
| if: contains(needs.version.outputs.BUILD_VERSION, 'SNAPSHOT') && github.actor == 'hauner' | |
| needs: [version, test] | |
| name: publish snapshot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: set up jdk | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 11 | |
| server-id: oap-snapshots | |
| server-username: PUBLISH_USER | |
| server-password: PUBLISH_KEY | |
| - name: Verify GPG Key Expiry | |
| run: | | |
| echo "${{ secrets.SIGN_KEY_2026 }}" | gpg --show-keys | |
| - name: publish snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SIGN_KEY: ${{ secrets.SIGN_KEY_2026 }} | |
| SIGN_KEY_PASS: ${{ secrets.SIGN_PWD }} | |
| PUBLISH_USER: ${{ secrets.PUBLISH_USER }} | |
| PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }} | |
| run: | | |
| ./mvnw --no-transfer-progress deploy |