name: CI Build

on:
  push:
    paths-ignore:
    - 'docs/**'
    - '.github/**/*docs*'
  pull_request:
    paths-ignore:
    - 'docs/**'
    - '.github/**/*docs*'

env:
  LC_ALL: en_US.UTF-8

defaults:
  run:
    shell: bash

jobs:
  JDKxx_Matrix:
    strategy:
      matrix:
        java: [ 11 ]
        os: [ ubuntu-latest, windows-latest ]
    name: JDK${{ matrix.java }} ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    steps:
    - name: Git Checkout
      uses: actions/checkout@v2
    - name: Set up Java ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java }}
    - name: Build
      run: |
        ./.github/scripts/build.sh
    - name: Publish
      if: success() && (matrix.java == '11') && (matrix.os == 'ubuntu-latest') && (github.repository == 'osgi/osgi.enroute') && (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request')
      run: |
        ./.github/scripts/publish.sh
      env:
        REPOSITORY_USERNAME: ${{ secrets.REPOSITORY_USERNAME }}
        REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }}

name: CI Build

on:
  push:
    paths-ignore:
    - 'docs/**'
    - '.github/**/*docs*'
  pull_request:
    paths-ignore:
    - 'docs/**'
    - '.github/**/*docs*'

env:
  LC_ALL: en_US.UTF-8

defaults:
  run:
    shell: bash

jobs:
  JDKxx_Matrix:
    strategy:
      matrix:
        java: [ 11 ]
        os: [ ubuntu-latest, windows-latest ]
    name: JDK${{ matrix.java }} ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    steps:
    - name: Git Checkout
      uses: actions/checkout@v2
    - name: Set up Java ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java }}
    - name: Build
      run: |
        ./.github/scripts/build.sh
    - name: Publish
      if: success() && (matrix.java == '11') && (matrix.os == 'ubuntu-latest') && (github.repository == 'osgi/osgi.enroute') && (github.ref == 'refs/heads/main') && (github.event_name != 'pull_request')
      run: |
        ./.github/scripts/publish.sh
      env:
        REPOSITORY_USERNAME: ${{ secrets.REPOSITORY_USERNAME }}
        REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }}

Change to use main branch as the canonical branch
actions: Change to use main branch as the canonical branch

Signed-off-by: BJ Hargrave <3d26bb3930946e3370762d769a073cece444c2d8@bjhargrave.com>
