Skip to content

Commit

Permalink
Replace Travis with Github Actions (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarsilver authored Aug 11, 2022
1 parent 91455a4 commit 016877b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 61 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
pull_request:
push:
branches:
- master
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
cache: gradle
- name: Build and test
run: ./gradlew build testRelease connectedCheck --exclude-task testDebugUnitTest
- name: Release and publish SDK
if: success() && startsWith(github.ref, 'refs/tags/')
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: samuelg
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
26 changes: 26 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update documentation
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
cache: gradle
- name: Generate documentation
run: |
./gradlew dokkaHtml &&
mkdir docs &&
cp -r webflows/build/dokka/html/. docs/.
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Schibsted account Android SDK

[![Build Status](https://app.travis-ci.com/schibsted/account-sdk-android-web.svg?branch=master)](https://app.travis-ci.com/schibsted/account-sdk-android-web)
![Build Status](https://github.com/schibsted/account-sdk-android-web/actions/workflows/ci.yaml/badge.svg)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/schibsted/account-sdk-android-web)
![Platform](https://img.shields.io/badge/Platform-Android%2021%2B-orange.svg?style=flat)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/schibsted/account-sdk-android-web/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion webflows/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ static String base64Decode(String envVar) {
}

signing {
useInMemoryPgpKeys(System.getenv('SIGNING_KEY_ID'), base64Decode('SIGNING_KEY'), base64Decode('SIGNING_PASSWORD'))
useInMemoryPgpKeys(base64Decode('SIGNING_KEY'), base64Decode('SIGNING_PASSWORD'))
sign publishing.publications
}

0 comments on commit 016877b

Please sign in to comment.