Skip to content

Commit

Permalink
EIP-136: Add release GitHub Action workflow. (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliouzbett authored May 20, 2024
1 parent cf08d6e commit a538012
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published, edited ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -57,3 +59,22 @@ jobs:
env:
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }}
MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }}

release:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up OpenMRS Nexus Releases
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
server-id: openmrs-repo-releases
server-username: MAVEN_REPO_USERNAME
server-password: MAVEN_REPO_API_KEY
- name: Publish to OpenMRS Nexus Releases
run: mvn deploy -DskipTests=true --batch-mode --show-version --file pom.xml
env:
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }}
MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }}

0 comments on commit a538012

Please sign in to comment.