Refactor: Cleanup workflow files

Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
This commit is contained in:
HeCodes2Much
2024-07-09 12:39:17 +01:00
parent 6594831cda
commit 43c51a9e35
14 changed files with 530 additions and 542 deletions

View File

@@ -1,30 +1,21 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Create Comment When Help wanted
on:
issues:
types:
- labeled
issues:
types:
- labeled
jobs:
add-comment:
if: contains(github.event.label.name, 'Help Wanted')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create comment
uses: peter-evans/create-or-update-comment@v4.0.0
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
add-comment:
if: contains(github.event.label.name, 'Help Wanted')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create comment
uses: peter-evans/create-or-update-comment@v4.0.0
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:

View File

@@ -1,59 +1,58 @@
# Builds the project
name: Android Feature Branch CI
on:
push:
branches:
- "*"
- "*/**"
- "!*main"
workflow_dispatch:
push:
branches:
- "*"
- "*/**"
- "!*main"
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3

View File

@@ -1,57 +1,56 @@
# Builds the project, signs an API, and then uploads it
name: Android Main Branch CI
on:
push:
branches:
- "main"
workflow_dispatch:
push:
branches:
- "main"
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3

View File

@@ -1,57 +1,56 @@
# Builds the project and uploads a debug APK
name: Android PR CI
on:
pull_request:
branches:
- "main"
workflow_dispatch:
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/debug/*.apk
retention-days: 3

View File

@@ -1,78 +1,77 @@
# Builds the project
name: Android Release CI Forced
on:
workflow_dispatch:
workflow_dispatch:
jobs:
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/release/*.apk
retention-days: 3
- name: Upload Artifact - WithInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithInternet
path: app/build/outputs/apk/withInternet/release/*.apk
retention-days: 3
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/release/*.apk
retention-days: 3
- name: Upload Artifact - WithoutInternet
uses: actions/upload-artifact@v4.3.4
with:
name: Signed app bundle - WithoutInternet
path: app/build/outputs/apk/withoutInternet/release/*.apk
retention-days: 3

View File

@@ -1,84 +1,83 @@
# Builds the project
name: Android Release CI
on:
push:
tags:
- "*"
push:
tags:
- "*"
jobs:
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Release to GitHub - WithInternet
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withInternet.outputs.signedFile}}
asset_name: EasyLauncher-Internet-${{ github.ref_name }}-Signed.apk
tag: ${{ github.ref }}
overwrite: true
- name: Release to GitHub - WithInternet
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withInternet.outputs.signedFile}}
asset_name: EasyLauncher-Internet-${{ github.ref_name }}-Signed.apk
tag: ${{ github.ref }}
overwrite: true
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Release to GitHub - WithoutInternet
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withoutInternet.outputs.signedFile}}
asset_name: EasyLauncher-${{ github.ref_name }}-Signed.apk
tag: ${{ github.ref }}
overwrite: true
- name: Release to GitHub - WithoutInternet
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withoutInternet.outputs.signedFile}}
asset_name: EasyLauncher-${{ github.ref_name }}-Signed.apk
tag: ${{ github.ref }}
overwrite: true

View File

@@ -1,54 +1,54 @@
name: Update CHANGELOG.md
on:
push:
tags:
- "*"
branches:
- "main"
workflow_dispatch:
push:
tags:
- "*"
branches:
- "main"
workflow_dispatch:
jobs:
changelog:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
fetch-depth: 0
changelog:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v3.2.0
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Generate a changelog
uses: orhun/git-cliff-action@v3.2.0
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6.1.0
with:
gpg_private_key: ${{ secrets.GIT_ACTIONS_GPG_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6.1.0
with:
gpg_private_key: ${{ secrets.GIT_ACTIONS_GPG_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit and push changes
run: |
if [[ `git status --porcelain` ]]; then
COMMIT_AUTHOR=$(git log -1 --pretty=%an)
if [[ "$COMMIT_AUTHOR" != "HeCodes2Much-Bot" ]]; then
git config --global user.name ${{ secrets.GIT_NAME }}
git config --global user.email ${{ secrets.GIT_EMAIL }}
git add -A
git commit -m "chore(changelog): Update CHANGELOG.md"
git push origin main
else
echo "WARNING: $COMMIT_AUTHOR last committed."
fi
else
echo "WARNING: No changes were detected."
fi
shell: bash
- name: Commit and push changes
run: |
if [[ `git status --porcelain` ]]; then
COMMIT_AUTHOR=$(git log -1 --pretty=%an)
if [[ "$COMMIT_AUTHOR" != "HeCodes2Much-Bot" ]]; then
git config --global user.name ${{ secrets.GIT_NAME }}
git config --global user.email ${{ secrets.GIT_EMAIL }}
git add -A
git commit -m "chore(changelog): Update CHANGELOG.md"
git push origin main
else
echo "WARNING: $COMMIT_AUTHOR last committed."
fi
else
echo "WARNING: No changes were detected."
fi
shell: bash

View File

@@ -1,31 +1,31 @@
name: Close Inactive Issues & Pull Requests
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9.0.0
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "Status: Stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
exempt-issue-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
days-before-pr-stale: 90
days-before-pr-close: 30
close-issue-reason: "not_planned"
stale-pr-label: "Status: Stale"
close-pr-label: "Status: Stale"
stale-pr-message: "This pull request is stale because it has been open for 30 days with no activity."
close-pr-message: "This pull request was closed because it has been inactive for 14 days since being marked as stale."
exempt-pr-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
repo-token: ${{ secrets.GIT_BOT_TOKEN }}
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9.0.0
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "Status: Stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
exempt-issue-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
days-before-pr-stale: 90
days-before-pr-close: 30
close-issue-reason: "not_planned"
stale-pr-label: "Status: Stale"
close-pr-label: "Status: Stale"
stale-pr-message: "This pull request is stale because it has been open for 30 days with no activity."
close-pr-message: "This pull request was closed because it has been inactive for 14 days since being marked as stale."
exempt-pr-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
repo-token: ${{ secrets.GIT_BOT_TOKEN }}

View File

@@ -1,16 +1,16 @@
name: Delete Unused Caches
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
jobs:
delete:
runs-on: ubuntu-latest
steps:
# Do other steps like checkout, install, compile, etc.
- uses: MyAlbum/purge-cache@v2.1.0
with:
max-age: 1800 # Cache max 7 days since last use (this is the default)
debug: true # Set to true to output debug info
delete:
runs-on: ubuntu-latest
steps:
# Do other steps like checkout, install, compile, etc.
- uses: MyAlbum/purge-cache@v2.1.0
with:
max-age: 1800 # Cache max 7 days since last use (this is the default)
debug: true # Set to true to output debug info

View File

@@ -1,21 +1,21 @@
name: GitGuardian scan
on: [push, pull_request]
on: [ push, pull_request ]
jobs:
scanning:
name: GitGuardian scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0 # fetch all history so multiple commits can be scanned
- name: GitGuardian scan
uses: GitGuardian/ggshield/actions/secret@v1.29.0
env:
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
scanning:
name: GitGuardian scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0 # fetch all history so multiple commits can be scanned
- name: GitGuardian scan
uses: GitGuardian/ggshield/actions/secret@v1.29.0
env:
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}

View File

@@ -2,23 +2,23 @@ name: GitHub Actions Version Updater
# Controls when the action will run.
on:
workflow_dispatch:
schedule:
# Automatically run on every Sunday
- cron: "0 0 * * 0"
workflow_dispatch:
schedule:
# Automatically run on every Sunday
- cron: "0 0 * * 0"
jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.GIT_BOT_TOKEN }}
steps:
- uses: actions/checkout@v4.1.7
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.GIT_BOT_TOKEN }}

View File

@@ -1,112 +1,114 @@
name: Nightly Release
on:
schedule:
- cron: "0 0 * * *" # This runs at midnight UTC every day
workflow_dispatch: # This allows the workflow to be triggered manually
schedule:
- cron: "0 0 * * *" # This runs at midnight UTC every day
workflow_dispatch: # This allows the workflow to be triggered manually
jobs:
release:
runs-on: ubuntu-latest
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out the repository
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: Delete existing nightly release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out the repository
uses: actions/checkout@v4.1.7
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_id=$(curl -sSf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/nightly" | jq -r '.id')
if [ -n "$release_id" ]; then
curl -sSf \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-X DELETE \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/${release_id}"
fi
- name: Delete existing nightly release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_id=$(curl -sSf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/nightly" | jq -r '.id')
if [ -n "$release_id" ]; then
curl -sSf \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-X DELETE \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/${release_id}"
fi
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout project
uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Get weather.properties from secrets
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Build with Gradle
run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withInternet
with:
releaseDir: app/build/outputs/apk/withInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Release to GitHub - WithInternet
uses: svenstaro/upload-release-action@2.9.0
with:
release_name: "Nightly"
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withInternet.outputs.signedFile}}
asset_name: EasyLauncher-Internet-Nightly-Signed.apk
tag: nightly
body: "This is a nightly build."
prerelease: true
overwrite: true
draft: false
- name: Release to GitHub - WithInternet
uses: svenstaro/upload-release-action@2.9.0
with:
release_name: "Nightly"
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withInternet.outputs.signedFile}}
asset_name: EasyLauncher-Internet-Nightly-Signed.apk
tag: nightly
body: "This is a nightly build."
prerelease: true
overwrite: true
draft: false
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Sign APK - WithoutInternet
uses: ilharp/sign-android-release@v1.0.4
# ID used to access action output
id: sign_app_withoutInternet
with:
releaseDir: app/build/outputs/apk/withoutInternet/release
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Release to GitHub - WithoutInternet
uses: svenstaro/upload-release-action@2.9.0
with:
release_name: "Nightly"
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withoutInternet.outputs.signedFile}}
asset_name: EasyLauncher-Nightly-Signed.apk
tag: nightly
body: "This is a nightly build."
prerelease: true
overwrite: true
draft: false
- name: Release to GitHub - WithoutInternet
uses: svenstaro/upload-release-action@2.9.0
with:
release_name: "Nightly"
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app_withoutInternet.outputs.signedFile}}
asset_name: EasyLauncher-Nightly-Signed.apk
tag: nightly
body: "This is a nightly build."
prerelease: true
overwrite: true
draft: false

View File

@@ -1,24 +1,24 @@
name: Thank New Reporters
on:
issues:
types:
- reopened
- opened
issues:
types:
- reopened
- opened
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GIT_BOT_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `👋 Thanks for reporting!
We will get back to you soon about this issue.`
})
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GIT_BOT_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `👋 Thanks for reporting!
We will get back to you soon about this issue.`
})

View File

@@ -1,20 +1,20 @@
name: Validate Gradle Wrapper
on:
push:
branches:
- "*"
- "!translate_main"
pull_request:
branches:
- "main"
push:
branches:
- "*"
- "!translate_main"
pull_request:
branches:
- "main"
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: gradle/wrapper-validation-action@v3.4.2
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: gradle/wrapper-validation-action@v3.4.2