Skip to content

Commit

Permalink
Added --batch to gpg import (#6)
Browse files Browse the repository at this point in the history
*Adding --batch to avoid Inappropriate ioctl for device error
* Modify regex to match beta versions (#7)
* Addressing bash syntax error in publish

Co-authored-by: Karthik Ramesh Iyer <Karthik.iyer2@yandex.com>
  • Loading branch information
reinecke and KarthikRIyer authored Apr 1, 2021
1 parent 96d7ded commit 40b0eb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
run: |
sudo apt install gnupg2
sudo apt install maven
gpg --import <(printenv secret_key | base64 --decode)
gpg --batch --import <(printenv secret_key | base64 --decode)
touch settings.xml && chmod 0600 settings.xml && printenv settings_xml > settings.xml
echo "sources_jar=$(find . -type f -name "*-sources.jar")" >> $GITHUB_ENV
echo "javadoc_jar=$(find . -type f -name "*-javadoc.jar")" >> $GITHUB_ENV
echo "lib_jar=$(find . -type f -name "*.[0-9].jar")" >> $GITHUB_ENV
echo "lib_jar=$(find . -type f -regextype posix-egrep -regex '.*/[^/]+-[0-9]+\.[0-9]+\.[0-9]+(-beta-[0-9]+)?\.jar')" >> $GITHUB_ENV
echo "pom_file=$(find . -type f -name "*.pom")" >> $GITHUB_ENV
- name: Upload
Expand All @@ -50,5 +50,5 @@ jobs:
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=$pom_file -Dfile=$lib_jar -Dpackaging=jar -s ./settings.xml &&
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=$pom_file -Dfile=$javadoc_jar -Dpackaging=jar -Dclassifier=javadoc -s ./settings.xml &&
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=$pom_file -Dfile=$sources_jar -Dpackaging=jar -Dclassifier=sources -s ./settings.xml;
} || { rm settings.xml; exit 1}
} || { rm settings.xml; exit 1;}
rm settings.xml

0 comments on commit 40b0eb4

Please sign in to comment.