Skip to content

Commit

Permalink
Create CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sushithegreat committed Oct 21, 2022
1 parent d620cc6 commit d1f6475
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: shipengine-java CD

on:
push:
branches:
- main


jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
package-name: shipengine

# Checkout code if release was created
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}

# Setup Java and deploy if a release was created
- name: Setup Java
uses: actions/[email protected]
with:
java-version: "11"
architecture: x64
distribution: "adopt"
server-id: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package to Maven
run: |
mvn --batch-mode deploy -Dmaven.test.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit d1f6475

Please sign in to comment.