This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declarations | |
ext["deps"] = mapOf( | |
"support" to mapOf( | |
"appCompat" to "com.android.support:appcompat-v7:26.0.2", | |
"design" to "com.android.support:design:26.0.2" | |
), | |
"picasso" to "com.squareup.picasso:picasso:2.5.2" | |
) | |
// References |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface DependencyItem | |
data class DependencyNotation(val notation: String) : DependencyItem | |
class DependencyGroup : DependencyItem { | |
val dependencies: Map<String, DependencyItem> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DependencyGroup { | |
// provides the `.``[]` operators | |
operator fun get(key: String): DependencyItem | |
// provides the `<key>(<notation>)` syntax | |
operator fun String.invoke(notation: String) | |
// provides the `<key> {<group>}` syntax | |
operator fun String.invoke(init: DependencyGroup.() -> Unit) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val ExtraPropertiesExtension.deps: DependencyGroup | |
get() = | |
if (has("deps")) this["deps"] as DependencyGroup | |
else DependencyGroup().apply { | |
this@deps["deps"] = this | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
add(new org.apache.ivy.plugins.resolver.URLResolver()) { | |
name = 'GitHub' | |
addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]' | |
} | |
} | |
dependencies { | |
classpath '<githubId>:<artifact>:<revision>' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SIG="-2" | |
if [[ "$2" != "" ]]; then | |
SIG="$2" | |
fi | |
ps -ef | grep $1 | grep -v grep | awk '{print $2}' | xargs kill $SIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as core from '@actions/core'; | |
import { context } from '@actions/github'; | |
import * as request from 'request-promise-native'; | |
(async function run() { | |
try { | |
const botToken = core.getInput('botToken'); | |
const chatId = core.getInput('chatId'); | |
const jobStatus = core.getInput('jobStatus'); | |
const skipSuccess = (core.getInput('skipSuccess') || 'true') === 'true'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Telegram Action' | |
description: 'Telegram notification for workflow set up with GitHub Actions' | |
author: <name> | |
inputs: | |
botToken: | |
description: 'The Telegram Bot token' | |
required: true | |
chatId: | |
description: 'The target to which the message will be sent, can be a Telegram Channel or Group' | |
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"build": "tsc", | |
"clean": "rm -rf lib package-lock.json", | |
"rebuild": "yarn clean && yarn build", | |
"release": "yarn clean && yarn && yarn build && yarn npm-lock && mv -f package-lock.json npm.lock && rm -rf node_modules && yarn --prod && mv npm.lock package-lock.json", | |
"dev": "yarn clean && yarn", | |
"npm-lock": "synp -f -s yarn.lock" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Branch/Tag | Desc | Development | Distribution | |
---|---|---|---|---|
master | where we commit changes | ✅ | ||
releases/v{version} | release candidates e.g. releases/v1.0 | ✅ | ||
v{version} | tags referred from workflows e.g. v1.0 | ✅ |