style:合并dev,升级版本号 #8
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 workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Java CI with Maven | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
maven-version: '3.6.3' | |
cache: maven | |
- name: Configure settings.xml | |
run: | | |
mkdir -p $HOME/.m2 | |
echo "<settings> | |
<servers> | |
<server> | |
<id>github</id> | |
<username>${{ secrets.MAVEN_USERNAME }}</username> | |
<password>${{ secrets.MAVEN_TOKEN }}</password> | |
</server> | |
</servers> | |
<profiles> | |
<profile> | |
<id>github</id> | |
<repositories> | |
<repository> | |
<id>github</id> | |
<url>https://maven.pkg.github.com/visual-ddd/wd-common-parent</url> | |
</repository> | |
</repositories> | |
</profile> | |
</profiles> | |
<repositories> | |
<!-- Central Maven Repository --> | |
<repository> | |
<id>central</id> | |
<url>https://repo.maven.apache.org/maven2</url> | |
</repository> | |
</repositories> | |
<activeProfiles> | |
<activeProfile>github</activeProfile> | |
</activeProfiles> | |
</settings>" > $HOME/.m2/settings.xml | |
- name: Build and deploy wd-parent | |
run: | | |
cd $GITHUB_WORKSPACE/wd-parent | |
mvn clean deploy | |
- name: Build and deploy wd-common-parent | |
run: | | |
cd $GITHUB_WORKSPACE/wd-common-parent | |
mvn clean deploy |