Skip to content

Fixed forClass in specific source set (#376) #417

Fixed forClass in specific source set (#376)

Fixed forClass in specific source set (#376) #417

Workflow file for this run

name: CI/CD
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
release:
types: [ published ]
permissions:
checks: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup host
uses: ./.github/actions/setup-host
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- name: Test & Build
run: ./gradlew build ${{ matrix.os == 'macos' && '-PkmpOnly=true' || '' }}
- name: Publish Test Report
if: ${{ !cancelled() }}
uses: gmazzo/publish-report-annotations@v1
with:
checkName: Test Results (${{ matrix.os }})
- name: Coverage report
if: ${{ matrix.os == 'ubuntu' }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: '**/build/reports/jacoco/**/*.xml'
- name: Publish
if: ${{ matrix.os == 'ubuntu' && !github.event.repository.fork && !github.event.pull_request.head.repo.fork }}
env:
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: true
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONARTYPE_KEY }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONARTYPE_PASSWORD }}
ORG_GRADLE_PROJECT_gitVersionForceSnapshot: ${{ github.event_name != 'release' }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ./gradlew publish
actionlint:
name: Validate Workflows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download actionlint
shell: bash
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Check workflow files
shell: bash
run: ./actionlint -color -format '{{range $err := .}}::error file={{$err.Filepath}},line={{$err.Line}},col={{$err.Column}}::{{$err.Message}}%0A```%0A{{replace $err.Snippet "\\n" "%0A"}}%0A```\n{{end}}' -ignore 'SC2016:'