Skip to content

Commit

Permalink
Remove gpg, deploy workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Jul 28, 2023
1 parent 4224790 commit 80f3302
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 75 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/maven-deploy.yml

This file was deleted.

17 changes: 7 additions & 10 deletions .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Verify SNAPSHOT
name: Maven Verify

on:
push:
Expand All @@ -16,15 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
restore-keys: ${{ runner.os }}-m2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: 'maven'

- name: Verify with Maven
run: |
mvn -B -f pom.xml clean install verify
46 changes: 20 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
types: [closed]
paths:
- '.github/project.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
release:
Expand Down Expand Up @@ -34,14 +41,10 @@ jobs:
with:
distribution: temurin
java-version: 11

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Configure Git author
run: |
Expand All @@ -50,22 +53,13 @@ jobs:
- name: Maven release ${{steps.metadata.outputs.current-version}}
run: |
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
git checkout -b release
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

- name: Push changes to ${{github.base_ref}}
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{github.base_ref}}

- name: Push tags
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
branch: ${{github.base_ref}}
- name: Push changes to ${{github.base_ref}} branch
run: |
git push
git push origin ${{steps.metadata.outputs.current-version}}
21 changes: 8 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,6 @@
</compilerArgs>
</configuration>
</plugin>
<!-- Attach source jar to all builds. Runs during the package phase.-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
Expand Down Expand Up @@ -328,6 +315,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${version.source.plugin}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<index>true</index>
Expand Down

0 comments on commit 80f3302

Please sign in to comment.