Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Jun 3, 2024
2 parents b530e2d + aea6bae commit 6b7e439
Show file tree
Hide file tree
Showing 51 changed files with 339 additions and 301 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/copy-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Copy Repository Secrets to Dependabot

on:
workflow_dispatch:

jobs:
copy-secrets:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: List repository secrets
id: list_secrets
run: |
secrets=$(gh api -H "Accept: application/vnd.github.v3+json" /repos/${{ github.repository }}/actions/secrets --jq '.secrets[].name')
echo "secrets=$secrets" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Copy secrets to Dependabot
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SECRETS: ${{ env.secrets }}
run: |
for secret in $SECRETS; do
secret_value=$(gh api -H "Accept: application/vnd.github.v3+json" /repos/${{ github.repository }}/actions/secrets/$secret --jq '.encrypted_value')
gh api -X PUT -H "Accept: application/vnd.github.v3+json" /repos/${{ github.repository }}/dependabot/secrets/$secret -f encrypted_value="$secret_value"
echo "Copied secret: $secret"
done
102 changes: 25 additions & 77 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,13 @@ env:
jobs:

GradleBuild:
runs-on: macos-13
runs-on: macos-14
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'
fetch-depth: 0
- name: Setup Gradle Repo
uses: Oztechan/Global/actions/[email protected]

- name: Adding secret files
run: |
Expand All @@ -83,22 +80,11 @@ jobs:
echo "${{ secrets.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/app/src/release/agconnect-services.json
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'

- name: Assemble
uses: gradle/actions/[email protected]
with:
arguments: assemble
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
run: ./gradlew assemble

- name: Upload Android Artifacts
uses: actions/[email protected].1
uses: actions/[email protected].3
if: github.event_name == 'push'
with:
name: androidArtifacts
Expand All @@ -123,10 +109,10 @@ jobs:
steps:

- name: Clone Repo # Needed for reading commit message for Firebase App Distribution
uses: actions/[email protected].1
uses: actions/[email protected].6

- name: Download Android Artifacts
uses: actions/[email protected].5
uses: actions/[email protected].7
with:
name: androidArtifacts

Expand All @@ -149,24 +135,20 @@ jobs:
- name: Delete Android Artifacts
uses: geekyeggo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: androidArtifacts

- name: Set Job Status
id: status
run: echo "status=success" >> $GITHUB_OUTPUT

XCodeBuild:
runs-on: macos-13
runs-on: macos-14
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'
fetch-depth: 0
- name: Setup Gradle Repo
uses: Oztechan/Global/actions/[email protected]

- name: Adding secret files
run: |
Expand All @@ -187,18 +169,12 @@ jobs:
echo "${{ secrets.IOS_GPG_RELEASE_XCCONFIG }}" > Release.xcconfig.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release/Config.xcconfig
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'

- name: Build
working-directory: ios
run: fastlane build

- name: Upload iOS Artifacts
uses: actions/[email protected].1
uses: actions/[email protected].3
if: github.event_name == 'push'
with:
name: iOSArtifacts
Expand All @@ -222,10 +198,10 @@ jobs:
status: ${{ steps.status.outputs.status }}
steps:
- name: Clone Repo
uses: actions/[email protected].1
uses: actions/[email protected].6

- name: Download iOS IPA
uses: actions/[email protected].5
uses: actions/[email protected].7
with:
name: iOSArtifacts
path: ios
Expand All @@ -240,40 +216,26 @@ jobs:
- name: Delete iOS IPA
uses: geekyeggo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: iOSArtifacts

- name: Set Job Status
id: status
run: echo "status=success" >> $GITHUB_OUTPUT

Quality:
runs-on: macos-13
runs-on: macos-14
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'

- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle Repo
uses: Oztechan/Global/actions/[email protected]

- name: Run Quality Jobs
uses: gradle/actions/[email protected]
with:
arguments: check koverMergedXmlReport --parallel
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
run: ./gradlew check koverMergedXmlReport --parallel

- name: Upload Coverage Report
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
name: coverageReport
path: build/reports/kover/merged/xml/report.xml
Expand All @@ -293,16 +255,16 @@ jobs:
status: ${{ steps.status.outputs.status }}
steps:
- name: Clone Repo # Codecov requires it
uses: actions/[email protected].1
uses: actions/[email protected].6

- name: Download Coverage Report
uses: actions/[email protected].5
uses: actions/[email protected].7
with:
name: coverageReport
path: build

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.0
uses: codecov/codecov-action@v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/report.xml
Expand All @@ -314,7 +276,7 @@ jobs:
coverage-reports: build/report.xml

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@v2.1.1
uses: sonarsource/sonarcloud-github-action@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -327,7 +289,6 @@ jobs:
- name: Delete Coverage Report
uses: geekyeggo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: coverageReport

- name: Set Job Status
Expand All @@ -340,24 +301,11 @@ jobs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'

- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle Repo
uses: Oztechan/Global/actions/[email protected]

- name: Detekt
uses: gradle/actions/[email protected]
with:
arguments: detektAll
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
run: ./gradlew detektAll

- name: SwiftLint
uses: norio-nomura/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
ProjectAutomations:
uses: Oztechan/Global/.github/workflows/[email protected].1
uses: Oztechan/Global/.github/workflows/[email protected].5
with:
project_id: 2
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:

PublishRelease:
uses: Oztechan/Global/.github/workflows/[email protected].1
uses: Oztechan/Global/.github/workflows/[email protected].5
with:
slack_channel: "ccc-github"
secrets: inherit
Loading

0 comments on commit 6b7e439

Please sign in to comment.