diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 15 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.md | 17 | ||||
-rwxr-xr-x | .github/checksum.sh | 23 | ||||
-rw-r--r-- | .github/workflows/deploy_snapshot.yml | 49 | ||||
-rw-r--r-- | .github/workflows/draft_new_release.yml | 15 | ||||
-rw-r--r-- | .github/workflows/pull_request.yml | 41 | ||||
-rw-r--r-- | .github/workflows/release.yml | 34 | ||||
-rw-r--r-- | .github/workflows/update_publicsuffix_data.yml | 15 |
8 files changed, 56 insertions, 153 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 435cbdcb..a7ef0f2d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,12 +1,23 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help us address issues you are facing with the app title: "[BUG]" -labels: bug +labels: bug, 'triage: needed' assignees: '' --- +<!-- +Thanks for taking the time to file this issue! Here are a few things to check before clicking the submit button :) + +1. Make sure you're on the latest version of the app. The current release can be found here: https://github.com/android-password-store/android-password-store/releases/latest. + +2. Search through **both** open and closed issues for your bug: https://github.com/android-password-store/Android-Password-Store/issues?q=is%3Aissue+sort%3Aupdated-desc+. + +3. ALWAYS fill this template. If you fail to do so, your issue will be immediately closed with no response. Maintaining open source projects for free is hard work, and we expect users to respect that time and effort by putting in a little bit of their own. That helps us fix these problems faster and in return you get a better app — everybody wins. + +--> + **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f4558654..66ac7d34 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,12 +1,23 @@ --- name: Feature request -about: Suggest an idea for this project +about: Suggest a new feature to be included in the app title: "[FEATURE]" -labels: enhancement -assignees: '' +labels: feature, 'triage: needed' +assignees: 'msfjarvis' --- +<!-- +Thanks for taking the time to file this issue! Here are a few things to check before clicking the submit button :) + +1. Make sure you're on the latest version of the app. Features are being added all the time and it is entirely possible what you're requesting has already been added. The current release can be found here: https://github.com/android-password-store/android-password-store/releases/latest. + +2. Check the changelog file to confirm that the feature hasn't been added for an upcoming release: https://github.com/android-password-store/Android-Password-Store/blob/develop/CHANGELOG.md. + +3. ALWAYS fill this template. If you fail to do so, your issue will be immediately closed with no response. Maintaining open source projects for free is hard work, and we expect users to respect that time and effort by putting in a little bit of their own. A feature request that is clear and explicit in its needs lets us get to work faster. + +--> + **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] diff --git a/.github/checksum.sh b/.github/checksum.sh deleted file mode 100755 index a1c7791a..00000000 --- a/.github/checksum.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -RESULT_FILE=$1 - -if [ -f $RESULT_FILE ]; then - rm $RESULT_FILE -fi -touch $RESULT_FILE - -checksum_file() { - echo $(sha256sum $1 | awk '{print $1}') -} - -FILES=() -while read -r -d ''; do - FILES+=("$REPLY") -done < <(find . -type f \( -name "build.gradle*" -o -name "dependencies.gradle" -o -name "gradle-wrapper.properties" \) -print0) - -# Loop through files and append MD5 to result file -for FILE in ${FILES[@]}; do - echo $(checksum_file $FILE) >> $RESULT_FILE -done -# Now sort the file so that it is -sort $RESULT_FILE -o $RESULT_FILE diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 3bb5d9c8..c31bbb78 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -20,40 +20,12 @@ jobs: - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - - name: Generate cache key - run: ./.github/checksum.sh checksum.txt - - - name: Cache gradle modules - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/modules-2 - key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlemodules- - - - name: Cache gradle jars - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/jars-3 - key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlejars- - - - name: Cache gradle build - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/build-cache-1 - key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlebuildcache- - - - name: Download gradle dependencies - run: ./gradlew dependencies - - name: Build release app - run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease + uses: burrunan/gradle-cache-action@v1 env: SNAPSHOT: "true" + with: + arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease - name: Clean secrets run: release/signing-cleanup.sh @@ -66,18 +38,3 @@ jobs: SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }} SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }} SSH_PORT: ${{ secrets.SSH_PORT }} - - - name: Install NodeJS - uses: actions/setup-node@v2-beta - with: - node-version: '12' - - - name: Install cfcli - run: npm install -g cloudflare-cli - - - name: Purge Cloudflare cache - run: | - cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/nonFree/release/; ls *.apk)" - cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/free/release/; ls *.apk)" - env: - CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index 91b047fb..914e6182 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -15,7 +15,7 @@ jobs: - name: Extract version from milestone run: | VERSION="${{ github.event.milestone.title }}" - echo "::set-env name=RELEASE_VERSION::$VERSION" + echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV - name: Create release branch run: git checkout -b release-${{ env.RELEASE_VERSION }} @@ -25,15 +25,16 @@ jobs: with: version: v${{ env.RELEASE_VERSION }} - - name: Initialize git config + - name: Initialize git config and commit changes run: | git config user.name "GitHub Actions" git config user.email noreply@github.com + git commit -am "Prepare release $RELEASE_VERSION" - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 + uses: repo-sync/pull-request@v2 with: - commit-message: "Prepare release ${{ env.RELEASE_VERSION }}" - branch: release-${{ env.RELEASE_VERSION }} - base: release - title: Release ${{ env.RELEASE_VERSION }} + source_branch: release-${{ env.RELEASE_VERSION }} + destination_branch: release + pr_title: Release ${{ env.RELEASE_VERSION }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f374c689..ec128f18 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -21,9 +21,9 @@ jobs: pull_number: context.payload.number, per_page: 100 }) - const serviceChanged = result.data.filter(f => f.filename.startsWith("app/") || f.filename.startsWith("buildSrc/") || f.filename.endsWith("gradle") || f.filename.startsWith(".github/workflows/pull_request.yml") || f.filename.startsWith("gradle") || f.filename.endsWith("properties")).length > 0 - console.log(serviceChanged) - return serviceChanged + const shouldRun = result.data.filter(f => !f.filename.endsWith(".md") || !f.filename.endsWith(".txt") || !f.filename.startsWith("contrib/") || !f.filename.endsWith(".yml")).length > 0 + console.log(shouldRun) + return shouldRun - name: Checkout repository if: ${{ steps.service-changed.outputs.result == 'true' }} @@ -33,40 +33,11 @@ jobs: if: ${{ steps.service-changed.outputs.result == 'true' }} run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - - name: Generate cache key - if: ${{ steps.service-changed.outputs.result == 'true' }} - run: ./.github/checksum.sh checksum.txt - - - name: Cache gradle modules - if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/modules-2 - key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlemodules- - - - name: Cache gradle jars - if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/jars-3 - key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlejars- - - - name: Cache gradle build - if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/build-cache-1 - key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlebuildcache- - - name: Run unit tests if: ${{ steps.service-changed.outputs.result == 'true' }} - run: ./gradlew testFreeDebug lintFreeDebug + uses: burrunan/gradle-cache-action@v1 + with: + arguments: apiCheck testFreeDebug lintFreeDebug - name: Run instrumentation tests if: ${{ steps.service-changed.outputs.result == 'true' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10484521..521f7af1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,38 +20,10 @@ jobs: - name: Copy CI gradle.properties run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - - name: Generate cache key - run: ./.github/checksum.sh checksum.txt - - - name: Cache gradle modules - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/modules-2 - key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlemodules- - - - name: Cache gradle jars - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/jars-3 - key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlejars- - - - name: Cache gradle build - uses: actions/cache@v2 - with: - path: ~/.gradle/caches/build-cache-1 - key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradlebuildcache- - - - name: Download gradle dependencies - run: ./gradlew dependencies - - name: Build release binaries - run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease + uses: burrunan/gradle-cache-action@v1 + with: + arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease - name: Upload non-free release APK uses: actions/upload-artifact@v2 diff --git a/.github/workflows/update_publicsuffix_data.yml b/.github/workflows/update_publicsuffix_data.yml index 29f1777f..e0e09f86 100644 --- a/.github/workflows/update_publicsuffix_data.yml +++ b/.github/workflows/update_publicsuffix_data.yml @@ -14,19 +14,22 @@ jobs: run: | git config user.name "GitHub Actions" git config user.email noreply@github.com + git checkout -b bot/update-psl - name: Download new publicsuffix data run: curl -L https://github.com/mozilla-mobile/android-components/raw/master/components/lib/publicsuffixlist/src/main/assets/publicsuffixes -o autofill-parser/src/main/assets/publicsuffixes - name: Compare list changes - run: if [[ $(git diff --binary --stat) != '' ]]; then echo "::set-env name=UPDATED::true"; fi + run: if [[ $(git diff --binary --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 + uses: repo-sync/pull-request@v2 if: env.UPDATED == 'true' with: - commit-message: Update Public Suffix List data - branch: bot/update-psl - base: develop - title: 'Update Public Suffix List data' + source_branch: bot/update-psl + destination_branch: develop + pr_title: "Update Public Suffix List data" + pr_body: "This is an automated pull request to update the publicsuffixes file to the latest copy from Mozilla" assignees: msfjarvis + pr_label: PSL + github_token: ${{ secrets.GITHUB_TOKEN }} |