Skip to content

Commit

Permalink
🤖 Revamp CI/CD pipelines (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sérgio Martins authored May 20, 2020
1 parent f1996df commit e61ea48
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]

jobs:
ci:
build:
runs-on: ubuntu-latest

steps:
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]

jobs:
cd:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -16,9 +16,6 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Initialize containers
run: docker-compose up -d
Expand All @@ -31,15 +28,5 @@ jobs:
- name: Check available containers
run: docker ps

- name: Install gpg secret key
run: |
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Deploy archetype
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
mvn -B clean deploy \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Tests
run: mvn -B clean integration-test
45 changes: 45 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Initialize containers
run: docker-compose up -d

- name: Wait containers
uses: jakejarvis/wait-action@master
with:
time: '30s'

- name: Check available containers
run: docker ps

- name: Install gpg secret key
run: |
echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Deploy archetype
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
mvn -B clean deploy \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

0 comments on commit e61ea48

Please sign in to comment.