chore: split YamlReadingTest into several files #1951
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pipeline | |
on: [push, pull_request] | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false" | |
concurrency: | |
cancel-in-progress: true | |
group: build-${{ github.event.pull_request.number || github.event.after }} | |
jobs: | |
test-matrix: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
tasks: check | |
- os: windows-latest | |
tasks: mingwX64Test | |
- os: macos-13 | |
tasks: macosX64Test iosX64Test | |
- os: macos-latest | |
tasks: macosArm64Test iosSimulatorArm64Test | |
runs-on: ${{ matrix.os }} | |
name: Test on ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v4.0.1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4.2.2 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4.0.1 | |
- name: Cache konan dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build | |
run: ./gradlew ${{ matrix.tasks }} | |
publish: | |
name: "Build and Publish" | |
needs: | |
- test-matrix | |
runs-on: macos-latest | |
env: | |
TERM: xterm-256color | |
GPG_KEY_ID: 6D76AD03 # Run `gpg -K` to get this, take last eight characters | |
permissions: | |
contents: write # Required to be able to publish releases, see https://docs.github.com/en/rest/reference/permissions-required-for-github-apps#permission-on-contents | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v4.0.1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4.2.2 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4.0.1 | |
- name: Cache konan dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build | |
run: ./gradlew assemble | |
- name: Assemble release | |
run: ./gradlew assembleRelease | |
env: | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' | |
- name: Publish snapshot | |
run: ./gradlew publishSnapshot | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && github.ref == 'refs/heads/main' && github.event_name == 'push' | |
- name: Publish release | |
run: ./gradlew publishRelease | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_KEY_RING: ${{ secrets.GPG_KEY_RING }} # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v2.0.8 | |
with: | |
files: build/release/* | |
fail_on_unmatched_files: true | |
draft: true # Update draft release with matching tag, if there is one. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: github.repository == 'charleskorn/kaml' && startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' |