Skip to content

Commit

Permalink
switch to setup-java@v2
Browse files Browse the repository at this point in the history
add release-from-tag
maven wrapper with maven 3.8.4
  • Loading branch information
stefanseifert committed Jan 7, 2022
1 parent dd53efd commit 444c39b
Show file tree
Hide file tree
Showing 7 changed files with 552 additions and 24 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
java: [8, 11, 17]
os: [ubuntu-latest]
distribution: [temurin]

steps:
# Check out Git repository
Expand All @@ -29,19 +30,12 @@ jobs:

# Set up environment with Java and Maven
- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

# Set up dependency cache
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'

# Build & verify
- name: Build and verify
run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean verify
run: ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean verify
17 changes: 5 additions & 12 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,15 @@ jobs:
# Set up environment with Java and Maven
- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 1.8

# Set up dependency cache
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: temurin
java-version: 8
cache: 'maven'

# Build, deploy to ossrh
- name: Build, verify, deploy, generate site
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy
run: ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy
19 changes: 19 additions & 0 deletions .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Create Release from Tag

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
body: 'Changes: https://github.com/wcm-io/io.wcm.maven.global-parent/blob/develop/changes.xml'
token: ${{ secrets.GITHUB_TOKEN }}
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
Loading

0 comments on commit 444c39b

Please sign in to comment.