Skip to content

Commit fec6810

Browse files
Removed GitHub workflow to sync with Codeberg
The Codeberg repository will now be updated manually when a release is made. Added new GitHub workflows: - Add comment for help wanted issues - Android branch CI - Android main CI - Android PR CI - Android release CI - Changelog generation - Close inactive issues and PRs - Delete unused caches - Thank new issue reporters - Validate Gradle Wrapper
1 parent a23126f commit fec6810

11 files changed

+407
-19
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Create Comment When Help wanted
11+
12+
on:
13+
issues:
14+
types:
15+
- labeled
16+
17+
jobs:
18+
add-comment:
19+
if: contains(github.event.label.name, 'Help Wanted')
20+
runs-on: ubuntu-latest
21+
permissions:
22+
issues: write
23+
steps:
24+
- name: Create comment
25+
uses: peter-evans/[email protected]
26+
with:
27+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
28+
issue-number: ${{ github.event.issue.number }}
29+
body: |
30+
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:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Builds the project
2+
name: Android Feature Branch CI
3+
4+
on:
5+
push:
6+
branches:
7+
- '*'
8+
- '*/**'
9+
- '!*main'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
name: Build, Sign & Upload
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout project
18+
uses: actions/[email protected]
19+
with:
20+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
21+
ref: main
22+
23+
- name: set up JDK 17
24+
uses: actions/[email protected]
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
cache: gradle
29+
30+
- uses: actions/[email protected]
31+
with:
32+
path: |
33+
~/.gradle/caches
34+
~/.gradle/wrapper
35+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
36+
restore-keys: |
37+
${{ runner.os }}-gradle-
38+
39+
- name: Grant execute permission for gradlew
40+
run: chmod +x gradlew
41+
42+
- name: Build with Gradle
43+
run: ./gradlew clean && ./gradlew assembleDebug
44+
45+
- name: Upload Artifact
46+
uses: actions/[email protected]
47+
with:
48+
name: Signed app apk
49+
path: app/build/outputs/apk/debug/*.apk
50+
retention-days: 3
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Builds the project, signs an API, and then uploads it
2+
name: Android Main Branch CI
3+
4+
on:
5+
push:
6+
branches:
7+
- 'main'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build, Sign & Upload
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout project
16+
uses: actions/[email protected]
17+
with:
18+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
19+
ref: main
20+
21+
- name: set up JDK 17
22+
uses: actions/[email protected]
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
cache: gradle
27+
28+
- uses: actions/[email protected]
29+
with:
30+
path: |
31+
~/.gradle/caches
32+
~/.gradle/wrapper
33+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradle-
36+
37+
- name: Grant execute permission for gradlew
38+
run: chmod +x gradlew
39+
40+
- name: Build with Gradle
41+
run: ./gradlew clean && ./gradlew assembleDebug
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Builds the project and uploads a debug APK
2+
name: Android PR CI
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- 'main'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build, Sign & Upload
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout project
16+
uses: actions/[email protected]
17+
with:
18+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
19+
ref: main
20+
21+
- name: set up JDK 17
22+
uses: actions/[email protected]
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
cache: gradle
27+
28+
- uses: actions/[email protected]
29+
with:
30+
path: |
31+
~/.gradle/caches
32+
~/.gradle/wrapper
33+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradle-
36+
37+
- name: Grant execute permission for gradlew
38+
run: chmod +x gradlew
39+
40+
- name: Build with Gradle
41+
run: ./gradlew clean && ./gradlew assembleDebug
42+
43+
- name: Upload Artifact
44+
uses: actions/[email protected]
45+
with:
46+
name: Signed app apk
47+
path: app/build/outputs/apk/debug/*.apk
48+
retention-days: 3
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Builds the project
2+
name: Android Release CI
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
build:
11+
name: Build, Sign & Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout project
15+
uses: actions/[email protected]
16+
with:
17+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
18+
ref: main
19+
20+
- name: set up JDK 17
21+
uses: actions/[email protected]
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
cache: gradle
26+
27+
- uses: actions/[email protected]
28+
with:
29+
path: |
30+
~/.gradle/caches
31+
~/.gradle/wrapper
32+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
33+
restore-keys: |
34+
${{ runner.os }}-gradle-
35+
36+
- name: Grant execute permission for gradlew
37+
run: chmod +x gradlew
38+
39+
- name: Build
40+
run: ./gradlew clean && ./gradlew assembleRelease && ./gradlew bundleRelease
41+
42+
- name: Sign APK
43+
uses: ilharp/[email protected]
44+
# ID used to access action output
45+
id: sign_app_apk
46+
with:
47+
releaseDir: app/build/outputs/apk/release
48+
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
49+
keyAlias: ${{ secrets.KEY_ALIAS }}
50+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
51+
keyPassword: ${{ secrets.KEY_PASSWORD }}
52+
buildToolsVersion: 35.0.0
53+
54+
- name: Release to GitHub
55+
uses: svenstaro/[email protected]
56+
with:
57+
repo_token: ${{ secrets.GITHUB_TOKEN }}
58+
file: ${{steps.sign_app_apk.outputs.signedFile}}
59+
asset_name: MultiLauncher-${{ github.ref_name }}-Signed.apk
60+
tag: ${{ github.ref }}
61+
overwrite: true
62+
63+
- name: Upload ProGuard Mapping File
64+
uses: svenstaro/[email protected]
65+
with:
66+
repo_token: ${{ secrets.GITHUB_TOKEN }}
67+
file: app/build/outputs/mapping/release/mapping.txt
68+
asset_name: MultiLauncher-${{ github.ref_name }}-mapping.txt
69+
tag: ${{ github.ref }}
70+
overwrite: true
71+
72+
- name: Sign AAB
73+
uses: ilharp/[email protected]
74+
# ID used to access action output
75+
id: sign_app_aab
76+
with:
77+
releaseDir: app/build/outputs/bundle/release/
78+
signingKey: ${{ secrets.SIGNINGKEY_BASE64 }}
79+
keyAlias: ${{ secrets.KEY_ALIAS }}
80+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
81+
keyPassword: ${{ secrets.KEY_PASSWORD }}
82+
buildToolsVersion: 35.0.0
83+
84+
- name: Release to GitHub
85+
uses: svenstaro/[email protected]
86+
with:
87+
repo_token: ${{ secrets.GITHUB_TOKEN }}
88+
file: ${{steps.sign_app_aab.outputs.signedFile}}
89+
asset_name: MultiLauncher-${{ github.ref_name }}-Signed.aab
90+
tag: ${{ github.ref }}
91+
overwrite: true

.github/workflows/blank.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/changelog.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Update CHANGELOG.md
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- 'main'
9+
workflow_dispatch:
10+
11+
jobs:
12+
changelog:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repository
16+
uses: actions/[email protected]
17+
with:
18+
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
19+
fetch-depth: 0
20+
ref: main
21+
22+
- name: Generate a changelog
23+
uses: orhun/[email protected]
24+
with:
25+
config: cliff.toml
26+
args: --verbose
27+
env:
28+
OUTPUT: CHANGELOG.md
29+
30+
- name: Configure git
31+
run: |
32+
git config user.name "${{ secrets.GIT_NAME }}"
33+
git config user.email "${{ secrets.GIT_EMAIL }}"
34+
35+
- name: Check for changes and commit
36+
env:
37+
GIT_NAME: ${{ secrets.GIT_NAME }}
38+
run: |
39+
if [[ $(git status --porcelain) ]]; then
40+
COMMIT_AUTHOR=$(git log -1 --pretty=%an)
41+
42+
if [[ "$COMMIT_AUTHOR" != "$GIT_NAME" ]]; then
43+
git add -u
44+
git commit -m "chore(changelog): Update CHANGELOG.md"
45+
git push origin main
46+
else
47+
echo "WARNING: Last commit was already made by $COMMIT_AUTHOR."
48+
fi
49+
else
50+
echo "WARNING: No changes detected."
51+
fi
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Close Inactive Issues & Pull Requests
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
close-issues:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
days-before-issue-stale: 30
18+
days-before-issue-close: 14
19+
stale-issue-label: "Status: Stale"
20+
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
21+
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
22+
exempt-issue-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
23+
days-before-pr-stale: 90
24+
days-before-pr-close: 30
25+
close-issue-reason: "not_planned"
26+
stale-pr-label: "Status: Stale"
27+
close-pr-label: "Status: Stale"
28+
stale-pr-message: "This pull request is stale because it has been open for 30 days with no activity."
29+
close-pr-message: "This pull request was closed because it has been inactive for 14 days since being marked as stale."
30+
exempt-pr-labels: "Status: Help wanted, Status: Work In Progress, Status: Waiting For a Response, Status: Todo"
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Delete Unused Caches
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
delete:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Do other steps like checkout, install, compile, etc.
13+
- uses: MyAlbum/[email protected]
14+
with:
15+
max-age: 1800 # Cache max 7 days since last use (this is the default)
16+
debug: true # Set to true to output debug info

0 commit comments

Comments
 (0)