Skip to content

Commit

Permalink
Merge pull request #102 from bmarwell/2.3-dist-rat-github-action
Browse files Browse the repository at this point in the history
[BUILD] sign and rat-check on CI build
  • Loading branch information
ddekany authored Nov 27, 2023
2 parents e571099 + 43e57dc commit 79b77fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,21 @@ jobs:
echo "mvnCommand=$(which mvn)" >> build.properties;
echo "gpgCommand=$(which gpg)" >> build.properties;
- name: Create a gpg key for signing
shell: bash
run: >-
gpg --quick-gen-key --batch --passphrase '' [email protected];
echo "batch" >> "/home/runner/.gnupg/gpg.conf";
echo "pinentry-mode=loopback" >> "/home/runner/.gnupg/gpg.conf";
- name: Prepare ant with ivy
shell: bash
run: ant download-ivy

- name: Build with Ant and ivy
shell: bash
run: ant ci
run: ant ci -Dci=true

- name: RAT check
shell: bash
run: ant rat
9 changes: 6 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
xmlns:bnd="http://www.aqute.biz/bnd"
xmlns:rat="antlib:org.apache.rat.anttasks"
xmlns:u="http://freemarker.org/util"
xmlns:if="ant:if"
xmlns:unless="ant:unless"
>

<!-- ================================================================== -->
Expand Down Expand Up @@ -748,11 +750,12 @@
<input
validargs="y,n"
addproperty="signatureGood"
unless:set="ci"
>Is the above signer the intended one for Apache releases?</input>
<condition property="signatureGood.y">
<condition property="signatureGood.y" unless:set="ci">
<equals arg1="y" arg2="${signatureGood}"/>
</condition>
<fail unless="signatureGood.y" message="Task aborted by user." />
<fail unless:set="ci" unless="signatureGood.y" message="Task aborted by user." />

<echo>Creating checksum file for "${archive.gzip}"...</echo>
<checksum file="${archive.gzip}" fileext=".sha512" algorithm="SHA-512" forceOverwrite="yes" />
Expand Down Expand Up @@ -952,7 +955,7 @@ Proceed? </input>
</target>

<target name="ci"
depends="ci-setup, clean, jar, test, javadoc"
depends="ci-setup, clean, _dist"
description="CI should invoke this task"
/>

Expand Down

0 comments on commit 79b77fa

Please sign in to comment.