Skip to content

Commit

Permalink
Set up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylwester Zieliński committed Jan 9, 2024
1 parent 6b18639 commit 0a9dc87
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy-to-nexus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to Nexus
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
deployToNexus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- shell: bash
env:
# The following env variables are used by gradle/publish-module.gradle
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# The following env variables are used by gradle/publish-root.gradle.kts
OSSR_USERNAME: ${{ secrets.OSSR_USERNAME }}
OSSR_PASSWORD: ${{ secrets.OSSR_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
# The script generates sec.gpg file that is required by gradle/publish-module.gradle
# and starts :deployNexus lane using fastlane.
run: |
java --version
echo "${{ secrets.GPG_FILE }}" > sec.gpg.asc
gpg -d --passphrase "${{ secrets.GPG_FILE_PSWD }}" --batch sec.gpg.asc > sec.gpg
fastlane deployNexus
2 changes: 2 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("no.nordicsemi.kmm") # e.g. com.krausefx.app
30 changes: 30 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do

desc "Deploy libraries to Nexus."
lane :deployNexus do
gradle(task: "publish")
gradle(task: "releaseStagingRepositories")
end

desc "Generate docs."
lane :generateDocs do
gradle(task: "dokkaHtmlMultiModule")
end
end

0 comments on commit 0a9dc87

Please sign in to comment.