Merge GitHub workflows

This commit is contained in:
Michael Bull 2024-03-03 06:16:38 +00:00
parent 9f93f45541
commit 76a69a50e8
4 changed files with 51 additions and 62 deletions

View File

@ -1,54 +0,0 @@
name: Build
on:
pull_request:
branches: [ "master" ]
workflow_call:
permissions:
contents: read
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
tasks: build
- os: macos-latest
tasks: >
iosX64Test
macosX64Test
tvosX64Test
watchosX64Test
- os: windows-latest
tasks: mingwX64Test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- uses: actions/cache@v4
with:
path: |
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle Wrapper
run: ./gradlew ${{ matrix.tasks }}

View File

@ -1,19 +1,62 @@
name: Deploy name: CI
on: on:
push: push:
branches: [ "master" ] branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: build:
uses: ./.github/workflows/build.yaml strategy:
matrix:
include:
- os: ubuntu-latest
tasks: build
deploy: - os: macos-latest
tasks: >
iosX64Test
macosX64Test
tvosX64Test
watchosX64Test
- os: windows-latest
tasks: mingwX64Test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- uses: actions/cache@v4
with:
path: |
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle Wrapper
run: ./gradlew ${{ matrix.tasks }}
publish:
needs: build needs: build
if: needs.build.result == 'success' if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success'
strategy: strategy:
matrix: matrix:

View File

@ -1,7 +1,7 @@
# kotlin-result # kotlin-result
[![Maven Central](https://img.shields.io/maven-central/v/com.michael-bull.kotlin-result/kotlin-result.svg)](https://search.maven.org/search?q=g:com.michael-bull.kotlin-result) [![Maven Central](https://img.shields.io/maven-central/v/com.michael-bull.kotlin-result/kotlin-result.svg)](https://search.maven.org/search?q=g:com.michael-bull.kotlin-result)
[![Build](https://github.com/michaelbull/kotlin-result/actions/workflows/build.yaml/badge.svg)](https://github.com/michaelbull/kotlin-result/actions/workflows/build.yaml) [![CI](https://github.com/michaelbull/kotlin-result/actions/workflows/ci.yaml/badge.svg)](https://github.com/michaelbull/kotlin-result/actions/workflows/ci.yaml)
[![License](https://img.shields.io/github/license/michaelbull/kotlin-result.svg)](https://github.com/michaelbull/kotlin-result/blob/master/LICENSE) [![License](https://img.shields.io/github/license/michaelbull/kotlin-result.svg)](https://github.com/michaelbull/kotlin-result/blob/master/LICENSE)
![badge][badge-android] ![badge][badge-android]

View File

@ -175,13 +175,13 @@ publishing {
} }
issueManagement { issueManagement {
system.set("GitHub") system.set("GitHub Issues")
url.set("https://github.com/michaelbull/kotlin-result/issues") url.set("https://github.com/michaelbull/kotlin-result/issues")
} }
ciManagement { ciManagement {
system.set("GitHub") system.set("GitHub Actions")
url.set("https://github.com/michaelbull/kotlin-result/actions/workflows/build.yaml") url.set("https://github.com/michaelbull/kotlin-result/actions")
} }
} }
} }