Skip to content

Commit

Permalink
update github actions workflow to publish artifacts to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
llopisdon committed Jul 25, 2021
1 parent 56046f4 commit 0726f26
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Android CI

on:
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
tags:
- '*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: set up JDK 11
Expand All @@ -21,5 +18,15 @@ jobs:

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build
run: ./gradlew assembleDebug

- name: GH Release
uses: softprops/action-gh-release@v0.1.5
if: startsWith(github.ref, 'refs/tags/')
with:
files: app/build/outputs/apk/debug/app-debug.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Astronomy Picture of the Day + Kotlin + Material Design (APODKTM)

![apodktm logo](app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png)

# Astronomy Picture of the Day + Kotlin + Material Design (APODKTM)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Android CI](https://github.com/llopisdon/APODKTM/actions/workflows/android.yml/badge.svg)](https://github.com/llopisdon/APODKTM/actions/workflows/android.yml)

# About

A sample Android app for viewing the NASA Astronomy Picture of the Day (APOD) archive for each month.

# Download

A sample Android app that stores and displays the NASA Astronomy Picture of the Day (APOD) for each month.
The latest DEBUG APK can be found here:

![](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=Latest&query=%24.name&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fllopisdon%2FAPODKTM%2Freleases%2Flatest)

[releases/latest/download/app-debug.apk](https://github.com/llopisdon/APODKTM/releases/latest/download/app-debug.apk)

# Screenshots

![screenshot](assets/screenshot.png)

The app demonstrates the use of the following technologies:

## The app demonstrates the use of the following technologies:

* Coil
* Hilt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ class ApodRepository(private val apodDao: ApodDao) {
return result
}

//
// note: sometimes requesting thumbnails can cause the server to crash with a 500
// this has been reported by several people. need to check for 500 then try
// a second request without thumbs to work around this.
// see:
// https://github.com/nasa/apod-api/issues/78
//
private suspend fun fetchApods(
startDate: LocalDate,
endDate: LocalDate
Expand Down Expand Up @@ -189,7 +193,7 @@ class ApodRepository(private val apodDao: ApodDao) {

//
// first check to see if we have any updates for the passed in month
// no regardless of the date
// regardless of the date
//

val lastUpdate = apodDao.getLastUpdate(id)
Expand Down

0 comments on commit 0726f26

Please sign in to comment.