Skip to content

Commit

Permalink
Releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
regulad committed Oct 20, 2024
1 parent 69ad509 commit ebcfb0d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- master
tags:
- "v*.*.*"
pull_request:
branches:
- master
tags:
- "v*.*.*"
schedule:
# ensures that workflow runs AT LEAST every 60 days to keep artifacts downloadable
- cron: "0 3 15 */2 *"
Expand All @@ -35,13 +35,36 @@ jobs:
# we don't need to declare any additional cache paths, the cache already catches everything
- uses: android-actions/setup-android@v3
- run: "chmod +x ./gradlew" # this project is used from windows, so it can be messed up
- run: "./gradlew build --no-daemon"
- uses: actions/upload-artifact@v4
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: "Build Debug APK"
run: "./gradlew build --no-daemon"
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: "Upload Debug APK"
uses: actions/upload-artifact@v4
with:
name: "gradle-artifacts"
path: |
app/build/outputs/apk/debug/app-debug.apk
- if: startsWith(github.ref, 'refs/tags/')
name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.KEYSTORE_FILE }}
run: |
echo $ENCODED_STRING | base64 -di > keystore.jks
- if: startsWith(github.ref, 'refs/tags/')
name: Build Release APK
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
./gradlew assembleRelease --no-daemon \
-Pandroid.injected.signing.store.file=../keystore.jks \
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
-Pandroid.injected.signing.key.alias=$KEY_ALIAS \
-Pandroid.injected.signing.key.password=$KEY_PASSWORD
- if: startsWith(github.ref, 'refs/tags/')
name: Upload Release APK
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/app-release-unsigned.apk
files: app/build/outputs/apk/release/app-release.apk
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ SupIR is an open-source general-purpose IR blaster for Android using the [irdb](

SupIR requires an Android phone with an IR blaster. If your phone does not have an IR blaster, unfortunately, you are out of luck. Consider finding a device like a Samsung Galaxy S4/S5 and bringing it up to date with LineageOS.

## Downloading

Releases are available from GitHub Releases.

## 2024-2025 Weekend Project #1

Hi, I'm Parker, and I'm a senior in High School. This year, I'm going to be making a project once every couple of weekends to keep my skills sharp and to learn new things. I'm going to be documenting my progress on this GitHub page, so I hope you stick around to see what I make!
Expand Down Expand Up @@ -80,3 +84,12 @@ modify or distribute this program.
CC0 License

Attribution: https://www.svgrepo.com/svg/259010/diode-led

## Automatic Releasing

If you choose to fork this repository and wish to enable automatic releasing, you will need to set up the following secrets:

* `KEYSTORE_FILE`: The Base64-encoded keystore file
* `KEYSTORE_PASSWORD`: The keystore password
* `KEY_ALIAS`: The key alias
* `KEY_PASSWORD`: The key password
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.TRANSMIT_IR" android:required="false" />
<uses-permission android:name="android.permission.TRANSMIT_IR" android:required="true" />
<uses-permission android:name="com.sony.remotecontrol.permission.API"/>
<uses-permission android:name="android.permission.VIBRATE"/>

<uses-feature android:name="android.hardware.consumerir" android:required="false"/>
<uses-feature android:name="android.hardware.consumerir" android:required="true"/>

<application
android:allowBackup="true"
Expand Down

0 comments on commit ebcfb0d

Please sign in to comment.