Skip to content

Commit

Permalink
Merge GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbull committed Mar 3, 2024
1 parent 9f93f45 commit 76a69a5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 62 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/build.yaml

This file was deleted.

51 changes: 47 additions & 4 deletions .github/workflows/deploy.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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

- 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 }}

deploy:
publish:
needs: build
if: needs.build.result == 'success'
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success'

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/publish-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
Expand Down

0 comments on commit 76a69a5

Please sign in to comment.