Skip to content

Test artifacts signature #708

Test artifacts signature

Test artifacts signature #708

Workflow file for this run

name: Build
on:
push:
branches:
- main
- 2.2.x
paths-ignore:
- README.adoc
- docs/**
pull_request:
branches:
- main
- 2.2.x
paths-ignore:
- README.adoc
- docs/**
jobs:
build:
name: Build
strategy:
fail-fast: false
max-parallel: 12
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
java:
- 11
- 17
- 21
# Support 1-year-old version + latest minor
maven:
- 3.8.8
- 3.9.6
runs-on: ${{ matrix.os }}
steps:
- uses: s4u/[email protected]
with:
java-distribution: 'temurin'
java-version: ${{ matrix.java }}
maven-version: ${{ matrix.maven }}
- name: Maven version
run: mvn -version
- name: Build & Test
run: mvn -B -Prun-its clean verify
javadocs:
name: Javadocs
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
java:
- 11
maven:
- 3.9.6
runs-on: ${{ matrix.os }}
steps:
- uses: s4u/[email protected]
with:
java-distribution: 'temurin'
java-version: ${{ matrix.java }}
maven-version: ${{ matrix.maven }}
- name: Build & Test
run: mvn -B clean javadoc:jar
signature:
name: Sign artifacts
environment: test
env:
GPG_KEYNAME: ${{ env.GPG_KEYNAME }}

Check failure on line 72 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml (Line: 72, Col: 20): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GPG_KEYNAME .github/workflows/build.yaml (Line: 73, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GPG_PASSPHRASE

Check failure on line 72 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml (Line: 72, Col: 20): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GPG_KEYNAME .github/workflows/build.yaml (Line: 73, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GPG_PASSPHRASE
GPG_PASSPHRASE: ${{ env.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ env.GPG_PRIVATE_KEY }}
ARTIFACTS_DIR: target/artifacts
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
java:
- 11
maven:
- 3.9.6
runs-on: ${{ matrix.os }}
steps:
- name: debug
run: |
echo $GPG_KEYNAME
echo $GPG_PASSPHRASE
echo $GPG_PRIVATE_KEY
- name: Prepare signature
run: echo -e "$GPG_PRIVATE_KEY" | gpg --import --batch
- uses: s4u/[email protected]
with:
java-distribution: 'temurin'
java-version: ${{ matrix.java }}
maven-version: ${{ matrix.maven }}
- name: Build & Test
run: mvn -B clean install -Prelease -DskipTests
- name: Collect artifacts
run: |
mkdir -p $ARTIFACTS_DIR
cp -r $HOME/.m2/repository/org/asciidoctor/asciidoctor-maven-* $ARTIFACTS_DIR
cp -r $HOME/.m2/repository/org/asciidoctor/*-doxia-module $ARTIFACTS_DIR
- name: Print jar signatures
run: find $ARTIFACTS_DIR -type f -name "*.jar" -exec gpg --verify "{}.asc" \;
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: signed-artifacts
path: ${{ env.ARTIFACTS_DIR }}