Skip to content

Commit

Permalink
chore: make separate step for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninerian committed Dec 21, 2021
1 parent fab9121 commit 9e334ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: Continuous Delivery

on:
release:
types: [published]

jobs:
continuous-delivery:
runs-on: ubuntu-20.04

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
maven_profiles: "release"
maven_args: >
-Drevision=${{ github.event.release.tag_name }}
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,3 @@ jobs:

- name: Run UI tests
run: make test

continuous-delivery:
if: startsWith(github.ref, 'refs/tags/')
needs: build-test
runs-on: ubuntu-20.04

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
maven_profiles: "release"
maven_args: >
-Drevision=${{ github.event.release.tag_name }}

0 comments on commit 9e334ae

Please sign in to comment.