Merge pull request #645 from ehrbase/dependabot/maven/commons-io-comm… #102
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
name: publish | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Build with Maven | |
run: mvn -B verify | |
- name: Setup Maven Central | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_TOKEN | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Publish to Maven Central | |
run: mvn -B deploy -P release -DskipTests | |
env: | |
OSSRH_USERNAME: ${{ secrets.S01_OSSRH_USERNAME }} | |
OSSRH_TOKEN: ${{ secrets.S01_OSSRH_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: 'Trigger ehrbase build' | |
if: github.ref == 'refs/heads/develop' | |
run: | | |
curl \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.BOT_ACCESS_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
https://api.github.com/repos/ehrbase/ehrbase/dispatches \ | |
-d '{"event_type":"build-and-test-postgres"}' |