Skip to content

Commit

Permalink
Merge branch 'develop' into feature/reading_plan_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
timbze committed Aug 24, 2023
2 parents 701760d + f9d12f3 commit 6c4532b
Show file tree
Hide file tree
Showing 1,177 changed files with 81,136 additions and 50,388 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indent_size=4
indent_style=space
indent_size=2

[*.js]
[*.{js, ts}]
indent_style=space
indent_size=4

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Bug report
name: Bug report (Production)
about: Create a report to help us improve
title: ''
labels: 'Type: Bug'
Expand All @@ -9,7 +9,7 @@ labels: 'Type: Bug'
**Describe the bug**
A clear and concise description of what the bug is.

**Bug was found on And Bible version**
**Bug was found on AndBible version**
Build XXX.X or version X.X.

**To Reproduce**
Expand Down
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report (Alpha)
about: Create a report to help us improve
title: ''
labels: 'Type: Bug, Affects: Alpha'

---

**Describe the bug**
A clear and concise description of what the bug is.

**Bug was found on AndBible version**
Build XXX.X or version X.X.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Smartphone (please complete the following information):**
- Device: [e.g. Samsung Galaxy S6]
- OS: [e.g. Android]
- Version [e.g. 8.0]

**Additional context**
Add any other context about the problem here.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/support_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Support request
about: Request help to solve your problem with And Bible
about: Request help to solve your problem with AndBible
title: ''
labels: 'Prio: Minor, Type: Support'
assignees: bvahedy
Expand All @@ -15,7 +15,7 @@ https://github.com/AndBible/and-bible/wiki/FAQ
**Describe your problem**
A clear and concise description of what's your problem.

**I'm using And Bible version**
**I'm using AndBible version**
Build XXX.X or version X.X.

**To Reproduce**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout current-stable branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.TOKEN_CI }}
fetch-depth: 50
Expand Down
53 changes: 31 additions & 22 deletions .github/workflows/build-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ jobs:
environment: And Bible Builds
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 10 # so that recent tags can be found
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up Node.js environment
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
# Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0
node-version: '14'

- name: Cache gradle dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Cache test modules
id: cache-test-modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.sword
key: ${{ runner.os }}-test-modules # cache auto-removes if not accessed in 7 days. If data needs to refresh, change key name here (till https://github.com/actions/cache/issues/2 is addressed)
Expand All @@ -62,34 +62,32 @@ jobs:
run: |
sed -i 's/\(android:versionName="[0-9]*.[0-9]*.[0-9]*\)/\1-alpha/' ./app/src/main/AndroidManifest.xml
- name: Check/set beta version suffix
if: contains(github.ref, 'refs/tags/beta-')
run: |
sed -i 's/\(android:versionName="[0-9]*.[0-9]*.[0-9]*\)/\1-beta/' ./app/src/main/AndroidManifest.xml
- name: Build with Gradle
run: ./gradlew --console plain assembleGithubRelease

# Test complete, create apk etc
# - name: Check/set beta version suffix
# if: contains(github.ref, 'refs/tags/beta-')
# run: |
# sed -i 's/\(android:versionName="[0-9]*.[0-9]*.[0-9]*\)/\1-beta/' ./app/src/main/AndroidManifest.xml

- name: Get variables
id: tag_name
run: |
echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
grep versionName ./app/src/main/AndroidManifest.xml | cut -d\" -f2 > VNAME
echo ::set-output name=VERSION_NAME::$(cat VNAME)
echo ::set-output name=RELEASE_TITLE::$( if [[ $GITHUB_REF =~ build- ]]; then git log -1 --pretty=%B; else echo "Release $(cat VNAME)"; fi )
echo VERSION_NAME=$(cat VNAME) >> $GITHUB_OUTPUT
echo RELEASE_TITLE=$( if [[ $GITHUB_REF =~ build- ]]; then git log -1 --pretty=%B; else echo "Release $(cat VNAME)"; fi ) >> $GITHUB_OUTPUT
echo "./fastlane/metadata/android/en-US/changelogs/$(cat VNAME).txt" > CLPATH
if [[ -f $(cat CLPATH) ]] && ! [[ $GITHUB_REF =~ build- ]]; then cp $(cat CLPATH) RELEASENOTES.txt; else cat > ./RELEASENOTES.txt; fi
- name: Sign apk
- name: Build with Gradle
run: ./gradlew --console plain assembleStandardGithubRelease assembleDiscreteGithubRelease

- name: Sign apks
if: contains(github.ref, 'refs/tags/')
env:
TAG_NAME: ${{ steps.tag_name.outputs.TAG }}
working-directory: ./app/build/outputs/apk/github/release
run: |
echo ${{ secrets.KEYSTORE_BASE64 }} | base64 --decode > keystore.jks
$ANDROID_HOME/build-tools/29.0.3/apksigner sign --ks keystore.jks --ks-pass 'pass:${{ secrets.KEYSTORE_PASSPHRASE }}' --key-pass 'pass:${{ secrets.KEY_PASSPHRASE }}' --out $GITHUB_WORKSPACE/andbible-$TAG_NAME.apk app-github-release-unsigned.apk
$ANDROID_SDK_ROOT/build-tools/29.0.3/apksigner sign --ks keystore.jks --ks-pass 'pass:${{ secrets.KEYSTORE_PASSPHRASE }}' --key-pass 'pass:${{ secrets.KEY_PASSPHRASE }}' --out $GITHUB_WORKSPACE/andbible-$TAG_NAME.apk app/build/outputs/apk/standardGithub/release/*-unsigned.apk
$ANDROID_SDK_ROOT/build-tools/29.0.3/apksigner sign --ks keystore.jks --ks-pass 'pass:${{ secrets.KEYSTORE_PASSPHRASE }}' --key-pass 'pass:${{ secrets.KEY_PASSPHRASE }}' --out $GITHUB_WORKSPACE/calc-$TAG_NAME.apk app/build/outputs/apk/discreteGithub/release/*-unsigned.apk
rm -f keystore.jks
- name: Create release
if: contains(github.ref, 'refs/tags/')
Expand All @@ -106,7 +104,7 @@ jobs:
body_path: ./RELEASENOTES.txt
prerelease: true

- name: Upload Release Apk
- name: Upload Standard release Apk
if: contains(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
Expand All @@ -117,6 +115,17 @@ jobs:
asset_path: ./andbible-${{ env.TAG_NAME }}.apk
asset_name: andbible-${{ env.TAG_NAME }}.apk
asset_content_type: application/vnd.android.package-archive
- name: Upload Discrete release Apk
if: contains(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ steps.tag_name.outputs.TAG }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./calc-${{ env.TAG_NAME }}.apk
asset_name: calculator-${{ env.TAG_NAME }}.apk
asset_content_type: application/vnd.android.package-archive

- name: Before saving cache
run: |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/config.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
#
# Copyright (c) 2022-2022 Martin Denham, Tuomas Airaksinen and the AndBible contributors.
#
# This file is part of AndBible: Bible Study (http://github.com/AndBible/and-bible).
#
# AndBible is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# AndBible is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with AndBible.
# If not, see http://www.gnu.org/licenses/.
#

current-stable=release/v4.0
main-branch=develop
68 changes: 55 additions & 13 deletions .github/workflows/jslint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run js lint and tests
name: Javascript checks

on:
push:
Expand All @@ -9,27 +9,34 @@ on:
paths:
- '**/*.vue'
- '**/*.js'
- '**/*.ts'
pull_request:
paths:
- '**/*.vue'
- '**/*.js'
- '**/*.ts'
workflow_dispatch:

permissions:
contents: read

jobs:
build:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 10 # so that recent tags can be found

- name: Set up Node.js environment
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Upgrade npm
working-directory: app/bibleview-js
run: npm install -g npm

- name: Run npm install
working-directory: app/bibleview-js
run: npm ci
Expand All @@ -38,23 +45,58 @@ jobs:
working-directory: app/bibleview-js
run: npm run lint:ci

unit-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 10 # so that recent tags can be found

- name: Set up Node.js environment
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Upgrade npm
working-directory: app/bibleview-js
run: npm install -g npm

- name: Run npm install
working-directory: app/bibleview-js
run: npm ci

- name: Run js unit tests
working-directory: app/bibleview-js
run: npm run test:ci
if: ${{ always() }}

- name: Upload lint results
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: js-results
path: app/bibleview-js/lint-results.txt
retention-days: 5

- name: Upload jest results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: js-results
path: app/bibleview-js/test-report.html
retention-days: 5
type-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 10 # so that recent tags can be found

- name: Set up Node.js environment
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Upgrade npm
working-directory: app/bibleview-js
run: npm install -g npm

- name: Run npm install
working-directory: app/bibleview-js
run: npm ci

- name: Run type-check
working-directory: app/bibleview-js
run: npm run type-check:ci
26 changes: 11 additions & 15 deletions .github/workflows/labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ name: Assign to projects based on labeling

on:
issues:
types: [labeled]
types:
- opened
pull_request:
types: [labeled]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
types:
- opened

jobs:
assign_to_tuomas_project:
permissions:
repository-projects: write
issues: read
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
name: Add discussions to Discussions project board
steps:
- uses: srggrs/assign-one-project-github-action@42352f30e8f3608e29350741411ab7061c953972 # 1.2.1
if: "contains(github.event.issue.labels.*.name, 'Type: Discussion')"
with:
project: 'https://github.com/AndBible/and-bible/projects/6'
column_name: 'Ongoing'
- uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/orgs/AndBible/projects/7
github-token: ${{ secrets.PROJECT_ACCESS_TOKEN }}
labeled: 'Type: Discussion'
Loading

0 comments on commit 6c4532b

Please sign in to comment.