Skip to content

Commit

Permalink
First cut build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
javsanbel2 committed Jul 8, 2021
1 parent 598f2e3 commit 6efd8a8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Make a build
on:
workflow_dispatch:
inputs:
branch:
description: "The branch to use to build a SNAPSHOT from."
required: true
default: "main"
jobs:
deploy:
name: Build SNAPSHOT to Sonatype
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
# this creates a settings.xml with the following server
settings-path: ${{ github.workspace }}
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
# only signed artifacts will be released to maven central. this sets up things for the maven-gpg-plugin
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Run Maven Targets
run: mvn deploy --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --no-transfer-progress --activate-profiles oss-release
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}

0 comments on commit 6efd8a8

Please sign in to comment.