-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cody-constine-ttd/master
Adding new workflows and setting up pom.xml to publish
- Loading branch information
Showing
6 changed files
with
172 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Build | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: mvn clean compile | ||
working-directory: ./attestation-aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Setup Dependancies | ||
inputs: | ||
key: | ||
descriptions: 'The Key to be imported' | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup settings.xml | ||
shell: bash | ||
run: | | ||
mkdir ~/.m2 | ||
echo "<settings>" >> ~/.m2/settings.xml | ||
echo " <servers>" >> ~/.m2/settings.xml | ||
echo " <server>" >> ~/.m2/settings.xml | ||
echo " <id>\${repo.id}</id>" >> ~/.m2/settings.xml | ||
echo " <username>\${repo.login}</username>" >> ~/.m2/settings.xml | ||
echo " <password>\${repo.pwd}</password>" >> ~/.m2/settings.xml | ||
echo " </server>" >> ~/.m2/settings.xml | ||
echo " </servers>" >> ~/.m2/settings.xml | ||
echo "</settings>" >> ~/.m2/settings.xml | ||
- name: Import GPG key | ||
shell: bash | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | base64 --decode > private.key | ||
gpg --batch --import private.key | ||
env: | ||
GPG_SIGNING_KEY: ${{ inputs.key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Publish Snapshot | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/workflows/download_gpg_key | ||
with: | ||
key: ${{ secrets.GPG_KEY }} | ||
- name: Deploy Snapshot | ||
working-directory: ./attestation-aws | ||
run: mvn -Drepo.id=ossrh -Drepo.login=uidadmin -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/workflows/download_gpg_key | ||
with: | ||
key: ${{ secrets.GPG_KEY }} | ||
- name: Remove Snapshot | ||
run: mvn versions:set -DremoveSnapshot | ||
working-directory: ./attestation-aws | ||
- name: Deploy Snapshot | ||
working-directory: ./attestation-aws | ||
run: mvn -Drepo.id=ossrh -Drepo.login=uidadmin -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters