Kactions is a set of scripts written to provide easy-to-configure and ready-to-use compiler actions. The aim is to allow new delevopers of Kotlin Multiplatform, to deploy their applications and libraries without much effort.
add a .yml
file in the directory .github/workflows
. The .github folder must be in the root directory.
Copy and paste this code to the .yml
file, based on your use case:
# MIT Licence
# Copyright 2024 feraxhp
name: Publish and Build library
run-name: 🚀 ¡Release! 🚀
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
library:
name: S1
uses: feraxhp/kactions/.github/workflows/publish.yml@v1.0.0
with:
module: ':ktheme' # << Your library module
secrets:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
Add these secrets in your repository:
Please run gpg --version
to make sure if you already have it.
- Install A GPG key manager for your system.
- Run this command to generate a gpg key:
gpg --gen-key
- The password provided in this step is your
SIGNING_KEY_PASSWORD
- Copy your public key and store it on a safe place
- You can see again your public key by running
gpg --list-keys
- Then you have to distribute your public key
gpg --keyserver keyserver.ubuntu.com --send-keys <YOUR_PUBLIC_KEY>
- Additional servers:
keyserver.ubuntu.com
keys.openpgp.org
pgp.mit.edu
- The last 8 Digits of your public key are your 'SIGNING_KEY_ID'
See the steps for SIGNING_KEY_ID >> 2 >> 2(-)
- Generate a private ket with this command:
gpg --armor --export-secret-keys <GPG_PUBLIC_KEY_ID> | cat -
- Copy it and store it on a save place
- This is your
SIGNING_KEY
(Also call private key)
- Register your self in Maven Central
- Register a namespace (if you're logging with GitHub. your name space must be set automatically)
- Got to manage account (Your email, in the top right corner, then, view account)
- Click on Generate User Token it must generate this xml:
<server>
<id>${server}</id>
<username>MAVEN_CENTRAL_USERNAME</username>
<password>MAVEN_CENTRAL_PASSWORD</password>
</server>
# MIT Licence
# Copyright 2024 feraxhp
name: Publish Wasm / Js App to pages
run-name: 🚀 ¡Deploy to pages! 🚀
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
pages:
name: S2
uses: feraxhp/kactions/.github/workflows/pages.yml@v1.0.0
with:
platform: 'Wasm' # << Or 'Js'
module: ':sample:composeApp'
- KmpLibrary
- Wasm App
- Js App
- Android App << Work in progress
- Desktop App
- Linux
- Windows
- MacOs
- Ios App
- Deploy to Pages
- Wasm
- Js
- Deploy to Maven central