Skip to content

Try publishing the multiplatform package to Github #78

Try publishing the multiplatform package to Github

Try publishing the multiplatform package to Github #78

Workflow file for this run

name: build
on:
push:
branches: '*'
tags: '*'
pull_request:
jobs:
unitTest:
runs-on: ubuntu-20.04
steps:
- name: Checkout the project
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build the project
run: ./gradlew build --stacktrace
- name: Run unit tests
run: ./gradlew check --stacktrace
- name: Upload coverage results
run: ./gradlew coverage coveralls --stacktrace
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set release name
run: sed -i "s/^\s+version '.*'/version '${{ github.event.inputs.version }}'/" build.gradle && cat build.gradle
if: ${{ github.event.inputs.version }}
- name: Build the project
run: ./gradlew build --stacktrace
- name: Publish package to Github
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}