Skip to content

Commit 43c51a9

Browse files
Refactor: Cleanup workflow files
Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
1 parent 6594831 commit 43c51a9

14 files changed

+551
-563
lines changed
Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
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-
101
name: Create Comment When Help wanted
112

123
on:
13-
issues:
14-
types:
15-
- labeled
4+
issues:
5+
types:
6+
- labeled
167

178
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/create-or-update-comment@v4.0.0
26-
with:
27-
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:
9+
add-comment:
10+
if: contains(github.event.label.name, 'Help Wanted')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
steps:
15+
- name: Create comment
16+
uses: peter-evans/create-or-update-comment@v4.0.0
17+
with:
18+
token: ${{ secrets.GIT_BOT_TOKEN }}
19+
issue-number: ${{ github.event.issue.number }}
20+
body: |
21+
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: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
1-
# Builds the project
21
name: Android Feature Branch CI
32

43
on:
5-
push:
6-
branches:
7-
- "*"
8-
- "*/**"
9-
- "!*main"
10-
workflow_dispatch:
4+
push:
5+
branches:
6+
- "*"
7+
- "*/**"
8+
- "!*main"
9+
workflow_dispatch:
1110

1211
jobs:
13-
build:
14-
name: Build, Sign & Upload
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout project
18-
uses: actions/checkout@v4.1.7
19-
with:
20-
token: ${{ secrets.GIT_BOT_TOKEN }}
21-
22-
- name: set up JDK 17
23-
uses: actions/setup-java@v4.2.1
24-
with:
25-
java-version: "17"
26-
distribution: "temurin"
27-
cache: gradle
28-
29-
- uses: actions/cache@v4.0.2
30-
with:
31-
path: |
32-
~/.gradle/caches
33-
~/.gradle/wrapper
34-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
35-
restore-keys: |
36-
${{ runner.os }}-gradle-
37-
38-
- name: Grant execute permission for gradlew
39-
run: chmod +x gradlew
40-
41-
- name: Get weather.properties from secrets
42-
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
43-
44-
- name: Build with Gradle
45-
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
46-
47-
- name: Upload Artifact - WithInternet
48-
uses: actions/upload-artifact@v4.3.4
49-
with:
50-
name: Signed app bundle - WithInternet
51-
path: app/build/outputs/apk/withInternet/debug/*.apk
52-
retention-days: 3
53-
54-
- name: Upload Artifact - WithoutInternet
55-
uses: actions/upload-artifact@v4.3.4
56-
with:
57-
name: Signed app bundle - WithoutInternet
58-
path: app/build/outputs/apk/withoutInternet/debug/*.apk
59-
retention-days: 3
12+
build:
13+
name: Build, Sign & Upload
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout project
17+
uses: actions/checkout@v4.1.7
18+
with:
19+
token: ${{ secrets.GIT_BOT_TOKEN }}
20+
21+
- name: set up JDK 17
22+
uses: actions/setup-java@v4.2.1
23+
with:
24+
java-version: "17"
25+
distribution: "temurin"
26+
cache: gradle
27+
28+
- uses: actions/cache@v4.0.2
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: Get weather.properties from secrets
41+
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
42+
43+
- name: Build with Gradle
44+
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
45+
46+
- name: Upload Artifact - WithInternet
47+
uses: actions/upload-artifact@v4.3.4
48+
with:
49+
name: Signed app bundle - WithInternet
50+
path: app/build/outputs/apk/withInternet/debug/*.apk
51+
retention-days: 3
52+
53+
- name: Upload Artifact - WithoutInternet
54+
uses: actions/upload-artifact@v4.3.4
55+
with:
56+
name: Signed app bundle - WithoutInternet
57+
path: app/build/outputs/apk/withoutInternet/debug/*.apk
58+
retention-days: 3
Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
1-
# Builds the project, signs an API, and then uploads it
21
name: Android Main Branch CI
32

43
on:
5-
push:
6-
branches:
7-
- "main"
8-
workflow_dispatch:
4+
push:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
98

109
jobs:
11-
build:
12-
name: Build, Sign & Upload
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout project
16-
uses: actions/checkout@v4.1.7
17-
with:
18-
token: ${{ secrets.GIT_BOT_TOKEN }}
19-
20-
- name: set up JDK 17
21-
uses: actions/setup-java@v4.2.1
22-
with:
23-
java-version: "17"
24-
distribution: "temurin"
25-
cache: gradle
26-
27-
- uses: actions/cache@v4.0.2
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: Get weather.properties from secrets
40-
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
41-
42-
- name: Build with Gradle
43-
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
44-
45-
- name: Upload Artifact - WithInternet
46-
uses: actions/upload-artifact@v4.3.4
47-
with:
48-
name: Signed app bundle - WithInternet
49-
path: app/build/outputs/apk/withInternet/debug/*.apk
50-
retention-days: 3
51-
52-
- name: Upload Artifact - WithoutInternet
53-
uses: actions/upload-artifact@v4.3.4
54-
with:
55-
name: Signed app bundle - WithoutInternet
56-
path: app/build/outputs/apk/withoutInternet/debug/*.apk
57-
retention-days: 3
10+
build:
11+
name: Build, Sign & Upload
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout project
15+
uses: actions/checkout@v4.1.7
16+
with:
17+
token: ${{ secrets.GIT_BOT_TOKEN }}
18+
19+
- name: set up JDK 17
20+
uses: actions/setup-java@v4.2.1
21+
with:
22+
java-version: "17"
23+
distribution: "temurin"
24+
cache: gradle
25+
26+
- uses: actions/cache@v4.0.2
27+
with:
28+
path: |
29+
~/.gradle/caches
30+
~/.gradle/wrapper
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
32+
restore-keys: |
33+
${{ runner.os }}-gradle-
34+
35+
- name: Grant execute permission for gradlew
36+
run: chmod +x gradlew
37+
38+
- name: Get weather.properties from secrets
39+
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
40+
41+
- name: Build with Gradle
42+
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
43+
44+
- name: Upload Artifact - WithInternet
45+
uses: actions/upload-artifact@v4.3.4
46+
with:
47+
name: Signed app bundle - WithInternet
48+
path: app/build/outputs/apk/withInternet/debug/*.apk
49+
retention-days: 3
50+
51+
- name: Upload Artifact - WithoutInternet
52+
uses: actions/upload-artifact@v4.3.4
53+
with:
54+
name: Signed app bundle - WithoutInternet
55+
path: app/build/outputs/apk/withoutInternet/debug/*.apk
56+
retention-days: 3
Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
1-
# Builds the project and uploads a debug APK
21
name: Android PR CI
32

43
on:
5-
pull_request:
6-
branches:
7-
- "main"
8-
workflow_dispatch:
4+
pull_request:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
98

109
jobs:
11-
build:
12-
name: Build, Sign & Upload
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout project
16-
uses: actions/checkout@v4.1.7
17-
with:
18-
token: ${{ secrets.GITHUB_TOKEN }}
19-
20-
- name: set up JDK 17
21-
uses: actions/setup-java@v4.2.1
22-
with:
23-
java-version: "17"
24-
distribution: "temurin"
25-
cache: gradle
26-
27-
- uses: actions/cache@v4.0.2
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: Get weather.properties from secrets
40-
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
41-
42-
- name: Build with Gradle
43-
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
44-
45-
- name: Upload Artifact - WithInternet
46-
uses: actions/upload-artifact@v4.3.4
47-
with:
48-
name: Signed app bundle - WithInternet
49-
path: app/build/outputs/apk/withInternet/debug/*.apk
50-
retention-days: 3
51-
52-
- name: Upload Artifact - WithoutInternet
53-
uses: actions/upload-artifact@v4.3.4
54-
with:
55-
name: Signed app bundle - WithoutInternet
56-
path: app/build/outputs/apk/withoutInternet/debug/*.apk
57-
retention-days: 3
10+
build:
11+
name: Build, Sign & Upload
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout project
15+
uses: actions/checkout@v4.1.7
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: set up JDK 17
20+
uses: actions/setup-java@v4.2.1
21+
with:
22+
java-version: "17"
23+
distribution: "temurin"
24+
cache: gradle
25+
26+
- uses: actions/cache@v4.0.2
27+
with:
28+
path: |
29+
~/.gradle/caches
30+
~/.gradle/wrapper
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
32+
restore-keys: |
33+
${{ runner.os }}-gradle-
34+
35+
- name: Grant execute permission for gradlew
36+
run: chmod +x gradlew
37+
38+
- name: Get weather.properties from secrets
39+
run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties
40+
41+
- name: Build with Gradle
42+
run: ./gradlew clean && ./gradlew assembleWithInternetDebug && ./gradlew assembleWithoutInternetDebug
43+
44+
- name: Upload Artifact - WithInternet
45+
uses: actions/upload-artifact@v4.3.4
46+
with:
47+
name: Signed app bundle - WithInternet
48+
path: app/build/outputs/apk/withInternet/debug/*.apk
49+
retention-days: 3
50+
51+
- name: Upload Artifact - WithoutInternet
52+
uses: actions/upload-artifact@v4.3.4
53+
with:
54+
name: Signed app bundle - WithoutInternet
55+
path: app/build/outputs/apk/withoutInternet/debug/*.apk
56+
retention-days: 3

0 commit comments

Comments
 (0)