Skip to content

Commit

Permalink
Upped actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Jan 13, 2023
1 parent ab35035 commit 1a415c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 35 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Create settings.xml
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "vpro-ossrh", "username": "vpro", "password": "${{secrets.SONATYPE_PASSWORD}}"}]'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
server-id: vpro-ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE
cache: maven
- name: Build with Maven
run: mvn -B -fn
run: mvn -ntp -B -fn
if: ${{ github.event_name == 'push' }}
- name: Deploy with Maven
run: OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }} mvn -B -Pdeploy deploy -DskipTests=true
run: mvn -ntp -B -Pdeploy deploy -DskipTests=true
if: ${{ github.event_name == 'push' }}
env:
SONATYPE_USERNAME: vpro
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}

34 changes: 14 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,28 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Create settings.xml
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "vpro-ossrh-release", "username": "vpro", "password": "${{secrets.SONATYPE_PASSWORD}}"}]'
- uses: crazy-max/ghaction-import-gpg@v3
with:
java-version: 11
server-id: vpro-ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE
cache: maven
- uses: oleksiyrudenko/[email protected]
with:
global: true
name: 'github'
email: '[email protected]'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Release
run: mvn -Pdeploy --batch-mode -Darguments=-DskipTests release:prepare release:perform
run: mvn --ntp Pdeploy --batch-mode -Darguments=-DskipTests release:prepare release:perform
env:
SONATYPE_USERNAME: vpro
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}

0 comments on commit 1a415c5

Please sign in to comment.