Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/upload_release_github_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Upload Release to GitHub Packages

on:
release:
types: [published]

jobs:
upload:
name: Upload
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache Local Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'

- name: Publish to GitHub Packages
run: |
if [ "${{ github.repository_owner }}" = "teragrep" ]; then
mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= -Dgpg.skip=true clean deploy -Ppublish-github-packages
else
mvn --batch-mode -Drevision=${{ github.event.release.tag_name }}-${{ github.actor }} -Dsha1= -Dchangelist= -Dgpg.skip=true clean deploy -Ppublish-github-packages
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 4 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -782,33 +782,12 @@
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/teragrep/pth_06</url>
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<jooq.regenerate.skip>true</jooq.regenerate.skip>
</properties>
</profile>
</profiles>
</project>