Skip to content
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
root = true

[*.{kt,kts}]
ktlint_code_style = ktlint_official
ktlint_code_style = intellij_idea
ktlint_standard_no_semi = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
Expand Down
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

39 changes: 14 additions & 25 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
---
name: Bug Report
description: Report a bug in Apollo

name: 'Bug Report'
description: 'Report a bug in Apollo'
title: '[BUG]'
labels: ['bug']
body:
- type: dropdown
id: is-regression
- type: markdown
attributes:
label: Is this a regression?
options:
- 'Yes'
- 'No'
validations:
required: true

value: |
Thanks for taking the time to report a bug!
- type: textarea
id: description
attributes:
label: Description
description: Also tell us, what did you expect to happen?
validations:
required: true

- type: textarea
id: exception-or-error
- type: input
id: version
attributes:
label: Please provide the exception or error you saw

- type: textarea
id: environment
attributes:
label: Please provide the environment you discovered this bug in

- type: textarea
id: other
attributes:
label: Anything else?
label: Version
description: Which version you are using?
validations:
required: true
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: 'Feature Request'
description: Suggest a new feature for Apollo

description: 'Suggest a new feature for Apollo'
title: '[FEATURE]'
labels: ['feature']
body:
- type: textarea
id: proposed-feature
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
if: matrix.os-type == 'macos'
run: |
brew tap messense/macos-cross-toolchains

- name: "Install Linux GNU for x86_64"
if: matrix.os-type == 'macos'
run: |
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
rustup target add x86_64-apple-darwin
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu

- uses: maxim-lobanov/setup-xcode@v1
if: matrix.os-type == 'macos'
with:
Expand All @@ -125,7 +125,7 @@ jobs:
- name: "Install rust toolchain (Macos)"
if: matrix.os-type == 'macos'
run: brew install rustup

- name: "Install wasm-pack"
run: cargo install wasm-pack

Expand All @@ -138,30 +138,30 @@ jobs:
- name: "Build Check All tests"
run: ./gradlew allTests

- name: "Generate kover coverage report"
run: ./gradlew koverHtmlReport koverXmlReport

- name: "Upload coverage html"
uses: actions/upload-artifact@v4.0.0
with:
name: coverage-results-${{ matrix.os-type }}.zip
path: apollo/build/reports/kover/html

- name: "Add coverage report to PR"
id: kover
uses: mi-kas/kover-report@v1
with:
path: ${{ github.workspace }}/apollo/build/reports/kover/report.xml
token: ${{ env.GITHUB_TOKEN }}
title: Code Coverage
update-comment: true
min-coverage-overall: 90
min-coverage-changed-files: 90
coverage-counter-type: LINE

- name: "Upload the build report"
if: always()
uses: actions/upload-artifact@v4
with:
path: "**/build/reports/"
name: report-${{ matrix.os-type }}
# - name: "Generate kover coverage report"
# run: ./gradlew koverHtmlReport koverXmlReport

# - name: "Upload coverage html"
# uses: actions/upload-artifact@v4.0.0
# with:
# name: coverage-results-${{ matrix.os-type }}.zip
# path: apollo/build/reports/kover/html

# - name: "Add coverage report to PR"
# id: kover
# uses: mi-kas/kover-report@v1
# with:
# path: ${{ github.workspace }}/apollo/build/reports/kover/report.xml
# token: ${{ env.GITHUB_TOKEN }}
# title: Code Coverage
# update-comment: true
# min-coverage-overall: 90
# min-coverage-changed-files: 90
# coverage-counter-type: LINE

# - name: "Upload the build report"
# if: always()
# uses: actions/upload-artifact@v4
# with:
# path: "**/build/reports/"
# name: report-${{ matrix.os-type }}
7 changes: 2 additions & 5 deletions .github/workflows/release-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ env:

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
Expand Down Expand Up @@ -97,7 +94,7 @@ jobs:
rustup target add x86_64-apple-darwin
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu


- name: "Install rust toolchain (Macos)"
if: matrix.os-type == 'macos'
Expand All @@ -108,7 +105,7 @@ jobs:

- name: "Dokka Documentation Generation"
run: |
./gradlew dokkaHtml
./gradlew :apollo:dokkaHtml --no-configuration-cache

- name: "Push"
uses: s0/git-publish-subdir-action@develop
Expand Down
98 changes: 41 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@ jobs:
unified_release:
name: Unified Release (Swift/Maven/npm)
runs-on: macos-latest
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.HYP_BOT_GPG_PRIVATE }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.HYP_BOT_GPG_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}

steps:
- name: Checkout specified branch
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
token: ${{ secrets.IDENTUS_CI }}

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4

- name: Install Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: zulu

- name: Setup Homebrew & Dependencies
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install autoconf automake libtool rustup gpg
brew tap messense/macos-cross-toolchains
brew install --overwrite x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu

- name: Clean Python Symlinks
- name: Install Dependencies
run: |
rm -f '/usr/local/bin/2to3' '/usr/local/bin/python3' '/usr/local/bin/python3-config'
brew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu
brew install autoconf automake x86_64-unknown-linux-gnu

- name: Install Rust Targets
run: |
Expand All @@ -76,95 +76,79 @@ jobs:
- name: Install wasm-pack
run: cargo install wasm-pack

- name: Setup node
if: ${{ inputs.release_ts }}
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Update gradle.properties with new version
run: |
sed -i '' 's/^version = *.*.*/version = ${{ github.event.inputs.version }}/' gradle.properties

- name: Update yarn
run: |
./gradlew kotlinUpgradeYarnLock

- name: Configure Gradle and GPG for Publishing
if: ${{ inputs.release_maven }}
env:
SIGNING_KEY: ${{ secrets.HYP_BOT_GPG_PRIVATE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.HYP_BOT_GPG_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.HYP_BOT_GPG_PASSWORD }}
run: |
echo "$SIGNING_KEY" > ${HOME}/secring.gpg
echo "mavenCentralUsername=${MAVEN_CENTRAL_USERNAME}" >> gradle.properties
echo "mavenCentralPassword=${MAVEN_CENTRAL_PASSWORD}" >> gradle.properties
echo "signing.password=${SIGNING_KEY_PASSWORD}" >> gradle.properties
echo "signing.secretKeyRingFile=${HOME}/secring.gpg" >> gradle.properties
echo "=== gradle.properties content ==="
cat gradle.properties
run: ./gradlew kotlinUpgradeYarnLock

- name: Build Kotlin Multiplatform Swift Artifacts
if: ${{ inputs.release_swift }}
run: |
./gradlew :apollo:createSwiftPackage
run: ./gradlew :apollo:createSwiftPackage --no-configuration-cache

- name: Build Kotlin Multiplatform Maven Artifacts
if: ${{ inputs.release_maven }}
run: |
./gradlew publishToMavenLocal
run: ./gradlew publishToMavenLocal --no-configuration-cache

- name: Build Kotlin Multiplatform NPM Artifacts
if: ${{ inputs.release_ts }}
run: |
./gradlew :apollo:assembleJsPackage
run: ./gradlew :apollo:assembleJsPackage

- name: Prepare Swift XCFramework
if: ${{ inputs.release_swift }}
run: |
cd ./apollo/build/packages/ApolloSwift
zip -r Apollo.xcframework.zip Apollo.xcframework
zip -r ApolloLibrary.xcframework.zip ApolloLibrary.xcframework
cd ${{ github.workspace }}
checksum=$(swift package compute-checksum ./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip)
checksum=$(swift package compute-checksum ./apollo/build/packages/ApolloSwift/ApolloLibrary.xcframework.zip)
sed -i.bak \
-e "s/checksum:.*/checksum: \"$checksum\"/" \
-e "s|download/.*/Apollo.xcframework.zip|download/v${{ github.event.inputs.version }}/Apollo.xcframework.zip|" \
-e "s|download/.*/ApolloLibrary.xcframework.zip|download/v${{ github.event.inputs.version }}/ApolloLibrary.xcframework.zip|" \
Package.swift

- name: Publish JVM & Android to Maven Central
if: ${{ inputs.release_maven }}
- name: Prepare CocoaPods Specification
if: ${{ inputs.release_swift }}
run: |
./gradlew publishAllPublicationsToMavenCentralRepository -Pversion=${{ github.event.inputs.version }}
sed -i.bak \
-e "s|download/.*/ApolloLibrary.xcframework.zip|download/v${{ github.event.inputs.version }}/ApolloLibrary.xcframework.zip|" \
-e "s|spec.version *= *'.*'|spec.version = '${{ github.event.inputs.version }}'|" \
ApolloLibrary.podspec

- name: Publish TypeScript package to npm
if: ${{ inputs.release_ts }}
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Publish JVM & Android to Maven Central
if: ${{ inputs.release_maven }}
env:
ORG_GRADLE_PROJECT_autoRelease: true
run: ./gradlew publishToMavenCentral --no-configuration-cache

- name: npm publish
- name: NPM publish
if: ${{ inputs.release_ts }}
run: |
./gradlew :apollo:publishJsPackageToNpmjsRegistry
run: ./gradlew :apollo:publishJsPackageToNpmjsRegistry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Commit updated files and tag the release
uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ inputs.release_swift }}
with:
commit_message: |
chore(release): v${{ github.event.inputs.version }}
tagging_message: v${{ github.event.inputs.version }}
file_pattern: |
Package.swift
package.json
CHANGELOG.md
gradle.properties
file_pattern: Package.swift ApolloLibrary.podspec gradle.properties

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: ${{ inputs.release_swift }}
with:
tag_name: v${{ github.event.inputs.version }}
files: |
./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip
./apollo/build/packages/ApolloSwift/ApolloLibrary.xcframework.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ JSLibs/iohk-crypto/node_modules
node_modules/
/.kotlin
/secp256k1-kmp/native/secp256k1
.swiftpm
.vscode
Loading
Loading