Skip to content

Commit f1a9275

Browse files
Dont sign gh build (#597)
* Don't sign GitHub Packages builds, make the GitHub Packages url dynamic to support forks * Remove unnecessary gpg passphrases from workflow * Adds missing permissions package write to github packages
1 parent bf44d23 commit f1a9275

2 files changed

Lines changed: 3 additions & 29 deletions

File tree

.github/workflows/upload_release_github_packages.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
upload:
99
name: Upload
1010
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
1113

1214
steps:
1315
- uses: actions/checkout@v4
@@ -25,15 +27,12 @@ jobs:
2527
with:
2628
java-version: 8.0.292+10
2729
distribution: 'adopt'
28-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
29-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3030

3131
- name: Setup GitHub Packages
3232
uses: actions/setup-java@v4
3333
with:
3434
java-version: 8.0.292+10
3535
distribution: 'adopt'
36-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3736

3837
- name: Install test dependencies
3938
run: cd / && sudo apt-get update && sudo apt-get install wget rpm2cpio && sudo wget -q https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/Packages/g/geolite2-city-20180605-1.el8.noarch.rpm && sudo wget -q https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/Packages/g/geolite2-country-20180605-1.el8.noarch.rpm && rpm2cpio geolite2-city-20180605-1.el8.noarch.rpm | sudo cpio -i --make-directories && rpm2cpio geolite2-country-20180605-1.el8.noarch.rpm | sudo cpio -i --make-directories
@@ -42,4 +41,3 @@ jobs:
4241
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-github-packages
4342
env:
4443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -587,33 +587,9 @@
587587
<repository>
588588
<id>github</id>
589589
<name>GitHub Packages</name>
590-
<url>https://maven.pkg.github.com/teragrep/pth_10</url>
590+
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
591591
</repository>
592592
</distributionManagement>
593-
<build>
594-
<plugins>
595-
<plugin>
596-
<groupId>org.apache.maven.plugins</groupId>
597-
<artifactId>maven-gpg-plugin</artifactId>
598-
<version>1.6</version>
599-
<executions>
600-
<execution>
601-
<id>sign-artifacts</id>
602-
<goals>
603-
<goal>sign</goal>
604-
</goals>
605-
<phase>verify</phase>
606-
<configuration>
607-
<gpgArguments>
608-
<arg>--pinentry-mode</arg>
609-
<arg>loopback</arg>
610-
</gpgArguments>
611-
</configuration>
612-
</execution>
613-
</executions>
614-
</plugin>
615-
</plugins>
616-
</build>
617593
</profile>
618594
<profile>
619595
<id>build-shaded-jar</id>

0 commit comments

Comments
 (0)