-
Notifications
You must be signed in to change notification settings - Fork 61
43 lines (36 loc) · 1.79 KB
/
main-branch-push-maven-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: main push maven deploy
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
- name: Set up BoS maven repo
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
java-version: '17'
distribution: 'temurin'
server-id: bos-repo # Value of the distributionManagement/repository/id field of the pom.xml
server-username: BOS_REPO_AK # env variable for username in deploy
server-password: BOS_REPO_SK # env variable for token in deploy
- name: Publish to BoS maven repo
run: mvn clean deploy -P bos-repo-deploy -pl :bifromq-plugin-auth-provider,:bifromq-plugin-event-collector,:bifromq-plugin-resource-throttler,:bifromq-plugin-sub-broker,:bifromq-plugin-setting-provider,:base-env-provider-spi,:base-kv-store-balance-spi,:bifromq-dist-spi -am -DskipTests -Dbos.repo.release=$BOS_REPO_RELEASE -Dbos.repo.snapshot=$BOS_REPO_SNAPSHOT
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
BOS_REPO_AK: ${{ secrets.BOS_REPO_AK }}
BOS_REPO_SK: ${{ secrets.BOS_REPO_SK }}
BOS_REPO_RELEASE: ${{ secrets.BOS_REPO_RELEASE }}
BOS_REPO_SNAPSHOT: ${{ secrets.BOS_REPO_SNAPSHOT }}