Initial commit.

This commit is contained in:
HeCodes2Much
2024-05-07 09:03:12 +01:00
commit 12d95a4db2
141 changed files with 9273 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# 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
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@71345be0265236311c031f5c7866368bd1eff043
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:

49
.github/workflows/android-branch_ci.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
# Builds the project
name: Android Feature Branch CI
on:
push:
branches:
- '*'
- '*/**'
- '!*main'
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: actions/cache@v3
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: Build with Gradle
run: ./gradlew clean && ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Signed app bundle
path: app/build/outputs/apk/debug/*.apk
retention-days: 3

47
.github/workflows/android-main_ci.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
# Builds the project, signs an API, and then uploads it
name: Android Main Branch CI
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: actions/cache@v3
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: Build with Gradle
run: ./gradlew clean && ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Signed app bundle
path: app/build/outputs/apk/debug/*.apk
retention-days: 3

47
.github/workflows/android-pr_ci.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
# Builds the project and uploads a debug APK
name: Android PR CI
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: actions/cache@v3
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: Build with Gradle
run: ./gradlew clean && ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Signed app bundle
path: app/build/outputs/apk/debug/*.apk
retention-days: 3

View File

@@ -0,0 +1,60 @@
# Builds the project
name: Android Release CI
on:
push:
tags:
- '*'
jobs:
build:
name: Build, Sign & Release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: actions/cache@v3
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: Build
run: ./gradlew clean && ./gradlew assembleRelease
- name: Sign APK
uses: ilharp/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDir: app/build/outputs/apk/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
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GIT_BOT_TOKEN }}
file: ${{steps.sign_app.outputs.signedFile}}
asset_name: mLauncher-${{ github.ref_name }}-Signed.apk
tag: ${{ github.ref }}
overwrite: true

55
.github/workflows/changelog.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Update CHANGELOG.md
on:
push:
tags:
- '*'
branches:
- 'main'
workflow_dispatch:
jobs:
changelog:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_BOT_TOKEN }}
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
with:
git_user_signingkey: true
git_commit_gpgsign: true
env:
GPG_PRIVATE_KEY: ${{ secrets.GIT_ACTIONS_GPG_KEY }}
- 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

@@ -0,0 +1,31 @@
name: Close Inactive Issues & Pull Requests
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
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

@@ -0,0 +1,16 @@
name: Delete Unused Caches
on:
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@master
with:
max-age: 1800 # Cache max 7 days since last use (this is the default)
debug: true # Set to true to output debug info

21
.github/workflows/gitguardian.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: GitGuardian scan
on: [push, pull_request]
jobs:
scanning:
name: GitGuardian scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history so multiple commits can be scanned
- name: GitGuardian scan
uses: GitGuardian/ggshield/actions/secret@v1.26.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

@@ -0,0 +1,24 @@
name: Thank New Reporters
on:
issues:
types:
- reopened
- opened
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
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

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