-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci][*][*] add action to build and publish packages (#7)
* [ci][*][*] add action to build and publish packages
- Loading branch information
Showing
6 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 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/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | ||
|
||
name: Maven Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Build with Maven | ||
run: scripts/package.sh | ||
|
||
- name: Publish to GitHub Packages Apache Maven | ||
run: scripts/deploy.sh | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
CURR_DIR="$(cd `dirname $0`; pwd)" | ||
source ${CURR_DIR}/print.sh | ||
|
||
print_title | ||
|
||
cd ${CURR_DIR}/../antchain-bridge-commons | ||
mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
if [ $? -ne 0 ]; then | ||
log_error "failed to deploy antchain-bridge-commons" | ||
exit 1 | ||
fi | ||
log_info "deploy antchain-bridge-commons successfully" | ||
cd - > /dev/null 2>&1 | ||
|
||
cd ${CURR_DIR}/../antchain-bridge-spi | ||
mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
if [ $? -ne 0 ]; then | ||
log_error "failed to deploy antchain-bridge-spi" | ||
exit 1 | ||
fi | ||
log_info "deploy antchain-bridge-spi successfully" | ||
cd - > /dev/null 2>&1 | ||
|
||
cd ${CURR_DIR}/../antchain-bridge-plugin-lib | ||
mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
if [ $? -ne 0 ]; then | ||
log_error "failed to deploy antchain-bridge-plugin-lib" | ||
exit 1 | ||
fi | ||
log_info "deploy antchain-bridge-plugin-lib successfully" | ||
cd - > /dev/null 2>&1 | ||
|
||
cd ${CURR_DIR}/../antchain-bridge-plugin-manager | ||
mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
if [ $? -ne 0 ]; then | ||
log_error "failed to deploy antchain-bridge-plugin-manager" | ||
exit 1 | ||
fi | ||
log_info "deploy antchain-bridge-plugin-manager successfully" | ||
cd - > /dev/null 2>&1 | ||
|
||
log_info "success" | ||
rm -rf antchain-bridge-sdk |