Skip to content

Instantly share code, notes, and snippets.

View Tweener's full-sized avatar

Vivien Mahé Tweener

View GitHub Profile
@Tweener
Tweener / publish.yml
Created March 3, 2024 19:07
Github Actions workflow to publish a KMP BoM on Sonatype Maven Central
name: Publish to Maven Central
permissions:
contents: read
on:
workflow_dispatch:
release:
types: [ released ]
@Tweener
Tweener / build.gradle.kts
Created March 3, 2024 18:33
Gradle configuration for publishing a Kotlin Multiplatform library on Maven Central
plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.dokka")
id("maven-publish")
id("signing")
...
}
...
@Tweener
Tweener / build.gradle.kts
Last active March 3, 2024 18:34
Gradle configuration for publishing a Kotlin Multiplatform BoM on Maven Central
plugins {
id("io.github.gradlebom.generator-plugin").version("1.0.0.Final")
id("signing")
}
group = "io.github.tweener" // Change here
version = "1.0.0" // Change here
publishing {
publications {
@Tweener
Tweener / publish.yml
Created February 23, 2024 09:14
Github Actions workflow to publish a KMP library on Sonatype Maven Central
name: Publish to Maven Central
permissions:
contents: read
on:
workflow_dispatch:
release:
types: [ released ]
@Tweener
Tweener / buildRelease.yml
Created February 23, 2024 09:11
Github Actions workflow to build a KMP library
name: Building my awesome library
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
@Tweener
Tweener / openai_firebase_cloud_function.js
Created January 29, 2024 17:31
Call OpenAI API safely with Firebase Cloud Function and Google Secret Manager
const {onRequest} = require("firebase-functions/v2/https");
const {logger} = require("firebase-functions/v2");
const {initializeApp} = require("firebase-admin/app");
const {defineSecret} = require("firebase-functions/params");
const axios = require("axios");
const cors = require("cors")({origin: true});
const admin = require("firebase-admin");
initializeApp();