Added kalk_web to ci

This commit is contained in:
bakk 2021-05-27 16:57:53 +02:00
parent a411b131bb
commit 05df1a2942
6 changed files with 57 additions and 12 deletions

View File

@ -51,7 +51,37 @@ jobs:
} }
EOD EOD
wasm-pack publish -a public wasm-pack publish -a public
publish_kalk_web:
name: publish kalk_web
runs-on: ubuntu-latest
needs: [publish_npm]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: build
run: |
cd kalk_web
npm install
- name: publish
run: echo success
- name: publish
run: |
sudo apt install expect
/usr/bin/expect <<EOD
spawn npm adduser
expect {
"Username:" {send "paddim8\r"; exp_continue}
"Password:" {send "${{ secrets.NPM_PASSWORD }}\r"; exp_continue}
"Email: (this IS public)" {send "bakk@tuta.io\r"; exp_continue}
}
EOD
npm publish
release_linux: release_linux:
name: release linux name: release linux
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -137,6 +167,7 @@ jobs:
release_android: release_android:
name: release android name: release android
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [publish_kalk_web]
defaults: defaults:
run: run:
working-directory: ./kalk_mobile working-directory: ./kalk_mobile
@ -158,7 +189,8 @@ jobs:
run: | run: |
npx cap sync npx cap sync
cd android cd android
./gradlew assembleRelease version=$(cat ../../kalk_web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
APP_VERSION_NAME=$version ./gradlew assembleRelease
- uses: r0adkll/sign-android-release@v1 - uses: r0adkll/sign-android-release@v1
name: sign apk name: sign apk
with: with:
@ -167,11 +199,11 @@ jobs:
alias: ${{ secrets.ALIAS }} alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }}
- run: mv android/app/build/outputs/apk/release/app-release-unsigned-signed.apk ./kalk-android.apk - run: mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../kalk-android.apk
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: binaries name: binaries
path: kalk_mobile/kalk-android.apk path: kalk-android.apk
create_release: create_release:
name: Create Release name: Create Release

4
Cargo.lock generated
View File

@ -127,7 +127,7 @@ dependencies = [
[[package]] [[package]]
name = "kalk" name = "kalk"
version = "2.0.0" version = "2.0.1"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"regex", "regex",
@ -139,7 +139,7 @@ dependencies = [
[[package]] [[package]]
name = "kalk_cli" name = "kalk_cli"
version = "0.5.0" version = "0.5.1"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"kalk", "kalk",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "kalk" name = "kalk"
version = "2.0.0" version = "2.0.1"
authors = ["PaddiM8"] authors = ["PaddiM8"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"

View File

@ -9,7 +9,7 @@ license = "MIT"
name = "kalk_cli" name = "kalk_cli"
readme = "../README.md" readme = "../README.md"
repository = "https://github.com/PaddiM8/kalk" repository = "https://github.com/PaddiM8/kalk"
version = "0.5.0" version = "0.5.1"
[[bin]] [[bin]]
name = "kalk" name = "kalk"
@ -17,7 +17,7 @@ path = "src/main.rs"
[dependencies] [dependencies]
ansi_term = "0.12.1" ansi_term = "0.12.1"
kalk = { path = "../kalk", version = "^2.0.0" } kalk = { path = "../kalk", version = "^2.0.1" }
lazy_static = "1.4.0" lazy_static = "1.4.0"
regex = "1" regex = "1"
rustyline = "7.1.0" rustyline = "7.1.0"

View File

@ -2,12 +2,25 @@ apply plugin: 'com.android.application'
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
def version = System.getenv("APP_VERSION_NAME") ?: "1.0.0"
def parts = version.split('\\.')
def major = parts[0]
def minor = parts[1]
def patch = parts[2]
if (major.size() == 1) major = major + "0"
if (minor.size() == 1) minor = minor + "0"
if (patch.size() == 1) patch = patch + "0"
def code = (major + minor + patch) as Integer
defaultConfig { defaultConfig {
applicationId "net.strct.kalk" applicationId "net.strct.kalk"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 11 versionCode code
versionName "1.1" versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {

View File

@ -1,6 +1,6 @@
{ {
"name": "@paddim8/kalk-component", "name": "@paddim8/kalk-component",
"version": "1.1.0", "version": "1.1.1",
"description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.", "description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.",
"svelte": "src/main.ts", "svelte": "src/main.ts",
"main": "public/build/bundle.js", "main": "public/build/bundle.js",