Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sign APKs only if not a PR from a fork #598

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
Expand All @@ -13,6 +14,9 @@ ij_smart_tabs = false
ij_visual_guides = none
ij_wrap_on_typing = false

[*.{yml,yaml}]
indent_size = 2

[*.{kt,kts}]
max_line_length = 200
ktlint_code_style = ktlint_official
Expand Down
32 changes: 26 additions & 6 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: ktlint check
run: ./gradlew ktlintCheck

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:

- name: compile
run: ./gradlew compileFdroidDebugKotlin

- name: lint
run: ./gradlew lintFdroidDebug

Expand Down Expand Up @@ -138,6 +138,18 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: prepare for build
# Do not run for forks
if: github.repository == 'spacecowboy/feeder'
shell: bash
run: ./prepare_for_build.sh
env:
SERVICEACCOUNTJSON: ${{ secrets.SERVICEACCOUNTJSON }}
KEYSTOREPASSWORD: ${{ secrets.KEYSTOREPASSWORD }}
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYPASSWORD: ${{ secrets.KEYPASSWORD }}
KEYALIAS: ${{ secrets.KEYALIAS }}

- name: setup JDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -173,6 +185,8 @@ jobs:
fetch-tags: true

- name: prepare for build
# Do not run for forks
if: github.repository == 'spacecowboy/feeder'
shell: bash
run: ./prepare_for_build.sh
env:
Expand All @@ -195,7 +209,7 @@ jobs:

- name: release apk
run: ./gradlew assemblePlayRelease

- name: save play apk
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -228,6 +242,8 @@ jobs:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: prepare for build
# Do not run for forks
if: github.repository == 'spacecowboy/feeder'
shell: bash
run: ./prepare_for_build.sh
env:
Expand Down Expand Up @@ -264,6 +280,8 @@ jobs:
fetch-tags: true

- name: prepare for build
# Do not run for forks
if: github.repository == 'spacecowboy/feeder'
shell: bash
run: ./prepare_for_build.sh
env:
Expand All @@ -280,6 +298,8 @@ jobs:
path: app/build/outputs/

- name: validate deploy
# Do not run for forks
if: github.repository == 'spacecowboy/feeder'
run: ./deploy_playstore_fast.sh --dry-run

deploy:
Expand Down Expand Up @@ -312,7 +332,7 @@ jobs:
with:
name: bundle
path: app/build/outputs/

- name: deploy beta
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# do not want this to run on master commit which is also a tag
Expand All @@ -339,12 +359,12 @@ jobs:

- name: get latest changelog entry
run: mkdir -p build && ci/latest-changelog.py CHANGELOG.md > build/release_notes.md

- name: copy fdroid apk
uses: actions/download-artifact@v4
with:
name: fdroid-apk

- name: copy play apk
uses: actions/download-artifact@v4
with:
Expand Down