Skip to content

Merge #812 from 2.x into 3.x #207

Merge #812 from 2.x into 3.x

Merge #812 from 2.x into 3.x #207

Workflow file for this run

#
# Copyright OmniFaces
#
# Licensed 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
#
# https://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.
#
# NOTE: this workflow file cannot have the same file name across all branches, otherwise each branch will pick the
# latest modified one. Hence the workflow files have each a different file name with the branch name as prefix.
name: 3.x
on:
push:
branches: [ 3.x ]
pull_request:
branches: [ 3.x ]
permissions:
contents: read
jobs:
test:
name: Test 3.x on ${{matrix.server}}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
server: [ wildfly, tomee, payara, tomcat-mojarra, tomcat-myfaces ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Test with Maven
run: mvn -B verify -P ${{matrix.server}}
deploy:
name: Deploy 3.x SNAPSHOT
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
- name: Extract project version
id: project
run: echo version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_OUTPUT
- name: Deploy with Maven
if: ${{endsWith(steps.project.outputs.version, '-SNAPSHOT')}}
run: mvn -B deploy -Dmaven.test.skip=true
env:
OSSRH_USERNAME: ${{secrets.OSSRH_USERNAME}}
OSSRH_PASSWORD: ${{secrets.OSSRH_PASSWORD}}