Skip to content

Commit

Permalink
File sync from s4u/.github - use setup-maven-action
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Action committed Aug 28, 2021
1 parent f96529f commit cdb1f06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 40 deletions.
38 changes: 11 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,11 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-${{ matrix.os }}-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-${{ matrix.os }}-jdk${{ matrix.java }}-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
properties: |
settings-sonatypeSnapshots: true
settings-properties: |
[
{"sonar.login": "2de0e32b2b3108965f76a4713ba2028978c233ed"},
{"sonar.branch.name": "${{ needs.setup.outputs.branch }}"}
Expand Down Expand Up @@ -97,14 +93,10 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-maven-site-test-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-maven-site-test-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: 8
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
settings-sonatypeSnapshots: true

- run: mvn --errors --show-version site

Expand All @@ -127,15 +119,11 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-ubuntu-latest-jdk8-deploy-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-ubuntu-latest-jdk8-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: 8
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
servers: '[{"id": "ossrh", "username": "${env.OSS_USER}", "password": "${env.OSS_PASS}"}]'
settings-sonatypeSnapshots: true
settings-servers: '[{"id": "ossrh", "username": "${env.OSS_USER}", "password": "${env.OSS_PASS}"}]'

- run: mvn --errors --show-version deploy -Dmaven.test.skip=true
env:
Expand All @@ -161,15 +149,11 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-maven-site-deploy-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-maven-site-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: 8
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
properties: |
settings-sonatypeSnapshots: true
settings-properties: |
[
{"username": "git"},
{"password": "${{ secrets.TECH_TOKEN }}"},
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-${{ matrix.os }}-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-${{ matrix.os }}-jdk${{ matrix.java }}-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
properties: |
settings-sonatypeSnapshots: true
settings-properties: |
[
{"sonar.pullrequest.key": "${{ github.event.number }}"},
{"sonar.pullrequest.base": "${{ github.event.pull_request.base.ref }}"},
Expand Down Expand Up @@ -93,13 +89,9 @@ jobs:
key: ${{ needs.setup.outputs.date-ym}}-maven-site-test-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ needs.setup.outputs.date-ym}}-maven-site-test-

- uses: actions/setup-java@v2.3.0
- uses: s4u/setup-maven-action@v1.0.0
with:
java-version: 8
distribution: 'adopt'

- uses: s4u/maven-settings-action@v2.4.1
with:
sonatypeSnapshots: true
settings-sonatypeSnapshots: true

- run: mvn --errors --show-version site

0 comments on commit cdb1f06

Please sign in to comment.