Merge GitHub workflows
This commit is contained in:
parent
9f93f45541
commit
76a69a50e8
54
.github/workflows/build.yaml
vendored
54
.github/workflows/build.yaml
vendored
@ -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 }}
|
@ -1,19 +1,62 @@
|
||||
name: Deploy
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
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
|
||||
if: needs.build.result == 'success'
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success'
|
||||
|
||||
strategy:
|
||||
matrix:
|
@ -1,7 +1,7 @@
|
||||
# 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)
|
||||
|
||||
![badge][badge-android]
|
||||
|
@ -175,13 +175,13 @@ publishing {
|
||||
}
|
||||
|
||||
issueManagement {
|
||||
system.set("GitHub")
|
||||
system.set("GitHub Issues")
|
||||
url.set("https://github.com/michaelbull/kotlin-result/issues")
|
||||
}
|
||||
|
||||
ciManagement {
|
||||
system.set("GitHub")
|
||||
url.set("https://github.com/michaelbull/kotlin-result/actions/workflows/build.yaml")
|
||||
system.set("GitHub Actions")
|
||||
url.set("https://github.com/michaelbull/kotlin-result/actions")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user